Skip to content

Commit

Permalink
Re-enable linker override for cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Oct 16, 2017
1 parent 89d9ce4 commit 0577b60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bootstrap/lib.rs
Expand Up @@ -661,8 +661,9 @@ impl Build {

/// Returns the path to the linker for the given target if it needs to be overriden.
fn linker(&self, target: Interned<String>) -> Option<&Path> {
if let Some(config) = self.config.target_config.get(&target) {
config.linker.as_ref().map(|p| &**p)
if let Some(linker) = self.config.target_config.get(&target)
.and_then(|c| c.linker.as_ref()) {
Some(linker)
} else if target != self.config.build &&
!target.contains("msvc") && !target.contains("emscripten") {
Some(self.cc(target))
Expand Down

0 comments on commit 0577b60

Please sign in to comment.