Skip to content

Commit 362bdf2

Browse files
committed
Be sure to compile with -fPIC
1 parent e38966c commit 362bdf2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ pub fn compile_library(output: &str, files: &[&str]) {
3232
cmd.arg("-m64");
3333
}
3434

35+
if !target.as_slice().contains("i686") {
36+
cmd.arg("-fPIC");
37+
}
38+
3539
let src = Path::new(os::getenv("CARGO_MANIFEST_DIR").unwrap());
3640
let dst = Path::new(os::getenv("OUT_DIR").unwrap());
3741
let mut objects = Vec::new();

0 commit comments

Comments
 (0)