diff options
| author | Vadim Chugunov <vadimcn@gmail.com> | 2014-09-20 11:42:10 -0700 |
|---|---|---|
| committer | Vadim Chugunov <vadimcn@gmail.com> | 2014-09-20 11:42:26 -0700 |
| commit | 04c41eb3726e5bd34d4bbdc7e405813a5a7e8cb3 (patch) | |
| tree | dca51053539f06eb83c2b0bb078cd251f24d63cc | |
| parent | 3b6e880fffb8e09b15bc6fc41d5b23f21bf5056d (diff) | |
| download | rust-04c41eb3726e5bd34d4bbdc7e405813a5a7e8cb3.tar.gz rust-04c41eb3726e5bd34d4bbdc7e405813a5a7e8cb3.zip | |
Move bundled gcc and its libs out into $rust/rustlib/<triple>/gcc/(bin|lib). This way the libs won't be on the -L library search path, and won't confuse external gcc, if one is used. The bundled gcc itself will still be able to find them, because it searches for libs relative to own install location.
| -rw-r--r-- | src/etc/make-win-dist.py | 6 | ||||
| -rw-r--r-- | src/librustc/metadata/filesearch.rs | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/etc/make-win-dist.py b/src/etc/make-win-dist.py index bb9a112b7b2..9d883dec968 100644 --- a/src/etc/make-win-dist.py +++ b/src/etc/make-win-dist.py @@ -58,15 +58,15 @@ def make_win_dist(dist_root, target_triple): for src in rustc_dlls: shutil.copy(src, dist_bin_dir) - # Copy platform tools (and another copy of runtime dlls) to platform-spcific bin directory - target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "bin") + # Copy platform tools to platform-specific bin directory + target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "bin") if not os.path.exists(target_bin_dir): os.makedirs(target_bin_dir) for src in target_tools: shutil.copy(src, target_bin_dir) # Copy platform libs to platform-spcific lib directory - target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "lib") + target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "lib") if not os.path.exists(target_lib_dir): os.makedirs(target_lib_dir) for src in target_libs: diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs index 148aaf95686..553ec096521 100644 --- a/src/librustc/metadata/filesearch.rs +++ b/src/librustc/metadata/filesearch.rs @@ -150,8 +150,12 @@ impl<'a> FileSearch<'a> { p.push(find_libdir(self.sysroot)); p.push(rustlibdir()); p.push(self.triple); - p.push("bin"); - vec![p] + let mut p1 = p.clone(); + p1.push("bin"); + let mut p2 = p.clone(); + p2.push("gcc"); + p2.push("bin"); + vec![p1, p2] } } |
