build.rs: Skip .S files on x86 and x86-64 Windows.
So far .S files are only used on non-x86, non-x86_64 targets. That will change soon, so prepare for that by filtering them out so that we don't feed them to MSVC.
This commit is contained in:
parent
244a1dee00
commit
fa6631463c
13
build.rs
13
build.rs
@ -462,6 +462,19 @@ fn build_c_code(
|
||||
let core_srcs = sources_for_arch(&target.arch)
|
||||
.into_iter()
|
||||
.filter(|p| !is_perlasm(p))
|
||||
.filter(|p| {
|
||||
if let Some(extension) = p.extension() {
|
||||
// We don't (and can't) use any .S on Windows since MSVC and NASM can't assemble
|
||||
// them.
|
||||
if extension == "S"
|
||||
&& (target.arch == X86_64 || target.arch == X86)
|
||||
&& target.os == WINDOWS
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let test_srcs = RING_TEST_SRCS.iter().map(PathBuf::from).collect::<Vec<_>>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user