Skip to content

Commit a965b5e

Browse files
committed
Just use masm on msvc targets.
A careful reading of the sources for `cc` suggest that `cc` should end up looking for `ml.exe` regardless of the `CC` set as long as the target has `msvc` in it and the file being compiled has `.asm` extension.
1 parent 6baa3d3 commit a965b5e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

psm/build.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,7 @@ fn main() {
7373

7474
let mut cfg = cc::Build::new();
7575
let msvc = cfg.get_compiler().is_like_msvc();
76-
let clang_cl = cfg
77-
.get_compiler()
78-
.path()
79-
.file_name()
80-
.and_then(|f| f.to_str())
81-
.map(|f| f.contains("clang-cl"))
82-
.unwrap_or(false);
83-
let masm = msvc && !clang_cl;
84-
let asm = if let Some((asm, canswitch)) = find_assembly(&arch, &endian, &os, &env, masm) {
76+
let asm = if let Some((asm, canswitch)) = find_assembly(&arch, &endian, &os, &env, msvc) {
8577
println!("cargo:rustc-cfg=asm");
8678
if canswitch {
8779
println!("cargo:rustc-cfg=switchable_stack")

0 commit comments

Comments
 (0)