From 94f05324fee6cd4637adc01f441fafd09e678668 Mon Sep 17 00:00:00 2001 From: Vadim Chugunov Date: Sat, 20 Sep 2014 11:44:01 -0700 Subject: [PATCH] Prefer bundled gcc. External gcc can still be used if one provides a full path via -Clinker=... --- src/librustc/driver/driver.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index bb454e07fc158..2d543d13065e7 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -562,8 +562,8 @@ pub fn phase_6_link_output(sess: &Session, trans: &CrateTranslation, outputs: &OutputFilenames) { let old_path = os::getenv("PATH").unwrap_or_else(||String::new()); - let mut new_path = os::split_paths(old_path.as_slice()); - new_path.push_all_move(sess.host_filesearch().get_tools_search_paths()); + let mut new_path = sess.host_filesearch().get_tools_search_paths(); + new_path.push_all_move(os::split_paths(old_path.as_slice())); os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap()); time(sess.time_passes(), "linking", (), |_|