Skip to content

Commit 63d011c

Browse files
committed
---
yaml --- r: 95211 b: refs/heads/dist-snap c: bf416e7 h: refs/heads/master i: 95209: 5b42f75 95207: fbea83a v: v3
1 parent 838057b commit 63d011c

File tree

91 files changed

+3861
-1185
lines changed

Some content is hidden

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

91 files changed

+3861
-1185
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 1d19ad97871d22fb26a6ba0856d106546da8612d
9+
refs/heads/dist-snap: bf416e7daf533fd4eb6f270da3ab965ac7422f05
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,7 @@ Supported traits for `deriving` are:
17751775
`obj.to_str()` has similar output as `fmt!("%?", obj)`, but it differs in that
17761776
each constituent field of the type must also implement `ToStr` and will have
17771777
`field.to_str()` invoked to build up the result.
1778+
* `FromPrimitive`, to create an instance from a numeric primitve.
17781779

17791780
### Stability
17801781
One can indicate the stability of an API using the following attributes:

branches/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/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)