Skip to content

Commit

Permalink
rustbuild: Pass -fPIC on 32-bit non-Windows platforms
Browse files Browse the repository at this point in the history
This is a smaller and more targeted backport of #39523 which drives to the heart
of the issue, just passing `-fPIC` on 32-bit platforms. More rationale for this
commit can be found in #39523 itself.
  • Loading branch information
alexcrichton committed Feb 9, 2017
1 parent 2a935f5 commit 1784a1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,11 @@ impl Build {
},
_ => {},
}

if !target.contains("windows") && target.contains("i686") {
base.push("-fPIC".into());
}

return base
}

Expand Down

0 comments on commit 1784a1a

Please sign in to comment.