Browse Source

Do not set the -fPIC flag for Windows targets when using clang for CXX builds (#481)

master
datalus 5 years ago
committed by GitHub
parent
commit
a885236506
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/lib.rs

2
src/lib.rs

@ -1374,7 +1374,7 @@ impl Build {
// Disable generation of PIC on bare-metal for now: rust-lld doesn't support this yet // Disable generation of PIC on bare-metal for now: rust-lld doesn't support this yet
if self if self
.pic .pic
.unwrap_or(!target.contains("windows-gnu") && !target.contains("-none-")) .unwrap_or(!target.contains("windows") && !target.contains("-none-"))
{ {
cmd.push_cc_arg("-fPIC".into()); cmd.push_cc_arg("-fPIC".into());
// PLT only applies if code is compiled with PIC support, // PLT only applies if code is compiled with PIC support,

Loading…
Cancel
Save