build library code as PIC
This commit is contained in:
parent
e9d6146b5b
commit
6125d4d6aa
2
build.rs
2
build.rs
|
@ -18,7 +18,7 @@ fn main() {
|
||||||
if let Some(basename) = eat_extension(filename, ".c") {
|
if let Some(basename) = eat_extension(filename, ".c") {
|
||||||
outpath = format!("{}/{}.o", out_dir, basename);
|
outpath = format!("{}/{}.o", out_dir, basename);
|
||||||
|
|
||||||
Command::new("cc").args(&[filepath.as_slice(), "-c", "-o"])
|
Command::new("cc").args(&[filepath.as_slice(), "-c", "-fPIC", "-o"])
|
||||||
.arg(outpath.clone())
|
.arg(outpath.clone())
|
||||||
.status().unwrap();
|
.status().unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue