Skip to content

Commit 5610e2a

Browse files
committed
---
yaml --- r: 82925 b: refs/heads/auto c: 49ac6ba h: refs/heads/master i: 82923: 22f2209 v: v3
1 parent b7bf1cd commit 5610e2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2198
-822
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1d19ad97871d22fb26a6ba0856d106546da8612d
16+
refs/heads/auto: 49ac6baa726988c7a84dff3bdc8c1f8812940224
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
6060

6161
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
6262
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
63+
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py i686-pc-mingw32/stage3/bin
6364
@$(call E, ISCC: $@)
6465
$(Q)"$(CFG_ISCC)" $<
6566
endif
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
# xfail-license
3+
4+
# Copies Rust runtime dependencies to the specified directory
5+
6+
import snapshot, sys, os, shutil
7+
8+
def copy_runtime_deps(dest_dir):
9+
for path in snapshot.get_winnt_runtime_deps():
10+
shutil.copy(path, dest_dir)
11+
12+
lic_dest = os.path.join(dest_dir, "third-party")
13+
shutil.rmtree(lic_dest) # copytree() won't overwrite existing files
14+
shutil.copytree(os.path.join(os.path.dirname(__file__), "third-party"), lic_dest)
15+
16+
copy_runtime_deps(sys.argv[1])

branches/auto/src/etc/get-snapshot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def unpack_snapshot(triple, dl_path):
2626
print("extracting " + p)
2727
tar.extract(p, download_unpack_base)
2828
tp = os.path.join(download_unpack_base, p)
29+
if os.path.isdir(tp) and os.path.exists(fp):
30+
continue
2931
shutil.move(tp, fp)
3032
tar.close()
3133
shutil.rmtree(download_unpack_base)

branches/auto/src/etc/pkg/rust.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DisableStartupPrompt=true
1919

2020
OutputDir=.\
2121
SourceDir=.\
22-
OutputBaseFilename=rust-{#CFG_VERSION}-install
22+
OutputBaseFilename=rust-{#CFG_VERSION_WIN}-install
2323
DefaultDirName={pf32}\Rust
2424

2525
Compression=lzma2/ultra

branches/auto/src/etc/snapshot.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def scrub(b):
5555
"lib/librustllvm.so"]
5656
}
5757

58+
winnt_runtime_deps = ["libgcc_s_dw2-1.dll",
59+
"libstdc++-6.dll",
60+
"libpthread-2.dll"]
61+
5862
def parse_line(n, line):
5963
global snapshotfile
6064

@@ -155,6 +159,19 @@ def hash_file(x):
155159
h.update(open(x, "rb").read())
156160
return scrub(h.hexdigest())
157161

162+
# Returns a list of paths of Rust's system runtime dependencies
163+
def get_winnt_runtime_deps():
164+
runtime_deps = []
165+
path_dirs = os.environ["PATH"].split(';')
166+
for name in winnt_runtime_deps:
167+
for dir in path_dirs:
168+
matches = glob.glob(os.path.join(dir, name))
169+
if matches:
170+
runtime_deps.append(matches[0])
171+
break
172+
else:
173+
raise Exception("Could not find runtime dependency: %s" % name)
174+
return runtime_deps
158175

159176
def make_snapshot(stage, triple):
160177
kernel = get_kernel(triple)
@@ -170,6 +187,7 @@ def in_tar_name(fn):
170187
return os.sep.join(cs[-2:])
171188

172189
tar = tarfile.open(file0, "w:bz2")
190+
173191
for name in snapshot_files[kernel]:
174192
dir = stage
175193
if stage == "stage1" and re.match(r"^lib/(lib)?std.*", name):
@@ -181,8 +199,15 @@ def in_tar_name(fn):
181199
if len(matches) == 1:
182200
tar.add(matches[0], "rust-stage0/" + in_tar_name(matches[0]))
183201
else:
184-
raise Exception("Found stale files: \n %s\n\
185-
Please make a clean build." % "\n ".join(matches))
202+
raise Exception("Found stale files: \n %s\n"
203+
"Please make a clean build." % "\n ".join(matches))
204+
205+
if kernel=="winnt":
206+
for path in get_winnt_runtime_deps():
207+
tar.add(path, "rust-stage0/bin/" + os.path.basename(path))
208+
tar.add(os.path.join(os.path.dirname(__file__), "third-party"),
209+
"rust-stage0/bin/third-party")
210+
186211
tar.close()
187212

188213
h = hash_file(file0)

0 commit comments

Comments
 (0)