Skip to content

Commit

Permalink
Be sure to compile with -fPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 1, 2014
1 parent e38966c commit 362bdf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ pub fn compile_library(output: &str, files: &[&str]) {
cmd.arg("-m64");
}

if !target.as_slice().contains("i686") {
cmd.arg("-fPIC");
}

let src = Path::new(os::getenv("CARGO_MANIFEST_DIR").unwrap());
let dst = Path::new(os::getenv("OUT_DIR").unwrap());
let mut objects = Vec::new();
Expand Down

0 comments on commit 362bdf2

Please sign in to comment.