build.rs: Don't try to set linker flags since we're not linking.
First, we were passing `-Wl,--gc-sections` to the compiler regardless of whether it is MSVC, which didn't make any sense on its own. But, even more generally, it doesn't make sense for us to try to tell the linker what to do when we aren't actually linking. (We're building static libraries of the C and assembly code.)
This commit is contained in:
parent
414e7a32ff
commit
3a650b3354
8
build.rs
8
build.rs
@ -509,14 +509,6 @@ fn build_library(
|
||||
// Rebuild the library if necessary.
|
||||
let lib_path = PathBuf::from(out_dir).join(format!("lib{}.a", lib_name));
|
||||
|
||||
match target.os.as_str() {
|
||||
"macos" => {
|
||||
let _ = c.flag("-Wl,-dead_strip");
|
||||
}
|
||||
_ => {
|
||||
let _ = c.flag("-Wl,--gc-sections");
|
||||
}
|
||||
}
|
||||
for o in objs {
|
||||
let _ = c.object(o);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user