diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-09-08 16:38:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-09-09 13:29:55 -0700 |
| commit | 3ebf25ee802877cd3940e08ed445a9999603c383 (patch) | |
| tree | fedd8e986d40686f51f4bf5192c14295596e0118 /src | |
| parent | 0c73e5fc5f212d30bb46b96cb45b51251217a199 (diff) | |
| download | rust-3ebf25ee802877cd3940e08ed445a9999603c383.tar.gz rust-3ebf25ee802877cd3940e08ed445a9999603c383.zip | |
Fix snapshot.py for win64
Diffstat (limited to 'src')
| -rw-r--r-- | src/etc/copy-runtime-deps.py | 6 | ||||
| -rw-r--r-- | src/etc/snapshot.py | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/etc/copy-runtime-deps.py b/src/etc/copy-runtime-deps.py index 8aab3f18bda..fd829cd0ab7 100644 --- a/src/etc/copy-runtime-deps.py +++ b/src/etc/copy-runtime-deps.py @@ -12,8 +12,8 @@ import snapshot, sys, os, shutil -def copy_runtime_deps(dest_dir): - for path in snapshot.get_winnt_runtime_deps(): +def copy_runtime_deps(dest_dir, triple): + for path in snapshot.get_winnt_runtime_deps(snapshot.get_platform(triple)): shutil.copy(path, dest_dir) lic_dest = os.path.join(dest_dir, "third-party") @@ -21,4 +21,4 @@ def copy_runtime_deps(dest_dir): shutil.rmtree(lic_dest) # copytree() won't overwrite existing files shutil.copytree(os.path.join(os.path.dirname(__file__), "third-party"), lic_dest) -copy_runtime_deps(sys.argv[1]) +copy_runtime_deps(sys.argv[1], sys.argv[2]) diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py index 82302da17b8..24255c0cc5d 100644 --- a/src/etc/snapshot.py +++ b/src/etc/snapshot.py @@ -39,8 +39,10 @@ snapshot_files = { "freebsd": ["bin/rustc"], } -winnt_runtime_deps = ["libgcc_s_dw2-1.dll", - "libstdc++-6.dll"] +winnt_runtime_deps_32 = ["libgcc_s_dw2-1.dll", + "libstdc++-6.dll"] +winnt_runtime_deps_64 = ["libgcc_s_seh-1.dll", + "libstdc++-6.dll"] def parse_line(n, line): global snapshotfile @@ -146,10 +148,14 @@ def hash_file(x): return scrub(h.hexdigest()) # Returns a list of paths of Rust's system runtime dependencies -def get_winnt_runtime_deps(): +def get_winnt_runtime_deps(platform): + if platform == "winnt-x86_64": + deps = winnt_runtime_deps_64 + else: + deps = winnt_runtime_deps_32 runtime_deps = [] - path_dirs = os.environ["PATH"].split(';') - for name in winnt_runtime_deps: + path_dirs = os.environ["PATH"].split(os.pathsep) + for name in deps: for dir in path_dirs: matches = glob.glob(os.path.join(dir, name)) if matches: @@ -189,7 +195,7 @@ def make_snapshot(stage, triple): "Please make a clean build." % "\n ".join(matches)) if kernel=="winnt": - for path in get_winnt_runtime_deps(): + for path in get_winnt_runtime_deps(platform): tar.add(path, "rust-stage0/bin/" + os.path.basename(path)) tar.add(os.path.join(os.path.dirname(__file__), "third-party"), "rust-stage0/bin/third-party") |
