Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,14 @@ impl Build {
let mut cmd = compiler.to_command();
let is_arm = target.contains("aarch64") || target.contains("arm");
let clang = compiler.family == ToolFamily::Clang;
let gnu = compiler.family == ToolFamily::Gnu;
command_add_output_file(
&mut cmd,
&obj,
self.cuda,
target.contains("msvc"),
clang,
gnu,
false,
is_arm,
);
Expand Down Expand Up @@ -1348,6 +1350,7 @@ impl Build {
let msvc = target.contains("msvc");
let compiler = self.try_get_compiler()?;
let clang = compiler.family == ToolFamily::Clang;
let gnu = compiler.family == ToolFamily::Gnu;

let (mut cmd, name) = if msvc && asm_ext == Some(AsmFileExt::DotAsm) {
self.msvc_macro_assembler()?
Expand All @@ -1367,7 +1370,9 @@ impl Build {
)
};
let is_arm = target.contains("aarch64") || target.contains("arm");
command_add_output_file(&mut cmd, &obj.dst, self.cuda, msvc, clang, is_asm, is_arm);
command_add_output_file(
&mut cmd, &obj.dst, self.cuda, msvc, clang, gnu, is_asm, is_arm,
);
// armasm and armasm64 don't requrie -c option
if !msvc || !is_asm || !is_arm {
cmd.arg("-c");
Expand Down Expand Up @@ -3544,10 +3549,11 @@ fn command_add_output_file(
cuda: bool,
msvc: bool,
clang: bool,
gnu: bool,
is_asm: bool,
is_arm: bool,
) {
if msvc && !clang && !cuda && !(is_asm && is_arm) {
if msvc && !clang && !gnu && !cuda && !(is_asm && is_arm) {
let mut s = OsString::from("-Fo");
s.push(&dst);
cmd.arg(s);
Expand Down