diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 926a1ca9664..254ed7fe5ac 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -42,6 +42,8 @@ pub struct TargetInfo { pub enum FileFlavor { /// Not a special file type. Normal, + /// Like `Normal`, but not directly executable + Auxiliary, /// Something you can link against (e.g., a library). Linkable { rmeta: bool }, /// Piece of external debug information (e.g., `.dSYM`/`.pdb` file). @@ -256,7 +258,7 @@ impl TargetInfo { ret.push(FileType { suffix: ".wasm".to_string(), prefix: prefix.clone(), - flavor: FileFlavor::Normal, + flavor: FileFlavor::Auxiliary, should_replace_hyphens: true, }) } diff --git a/src/cargo/core/compiler/context/mod.rs b/src/cargo/core/compiler/context/mod.rs index db5ea9eca17..2e1c4a25e2c 100644 --- a/src/cargo/core/compiler/context/mod.rs +++ b/src/cargo/core/compiler/context/mod.rs @@ -167,7 +167,8 @@ impl<'a, 'cfg> Context<'a, 'cfg> { for unit in units.iter() { for output in self.outputs(unit)?.iter() { - if output.flavor == FileFlavor::DebugInfo { + if output.flavor == FileFlavor::DebugInfo || output.flavor == FileFlavor::Auxiliary + { continue; }