Skip to content

Commit 6b21faf

Browse files
committed
---
yaml --- r: 123903 b: refs/heads/snap-stage3 c: 7ab9bfa h: refs/heads/master i: 123901: d01d97a 123899: 9ad804f 123895: 38b726c 123887: 5196221 123871: 906ccab 123839: 6269438 123775: 1e3a002 123647: 92b8802 123391: e264976 122879: f75ddb7 v: v3
1 parent 9e3361b commit 6b21faf

File tree

93 files changed

+8821
-12693
lines changed

Some content is hidden

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

93 files changed

+8821
-12693
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4e2da7cb79143b0e7206a684629ed942599ec8e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 3e49647a497f728ea4283070028e8512b1bd3173
4+
refs/heads/snap-stage3: 7ab9bfab4e623f67ea32db1ec50f8b79c1514e40
55
refs/heads/try: 296eb104620b346d88bc4a2c2ab7693e6d3db019
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/crates.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,19 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rlibc alloc debug rustrt
54+
url log regex graphviz core rlibc alloc debug rustrt \
55+
unicode
5556
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5657
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5758
TOOLS := compiletest rustdoc rustc
5859

5960
DEPS_core :=
6061
DEPS_rlibc :=
62+
DEPS_unicode := core
6163
DEPS_alloc := core libc native:jemalloc
6264
DEPS_debug := std
6365
DEPS_rustrt := alloc core libc collections native:rustrt_native
64-
DEPS_std := core libc rand alloc collections rustrt sync \
66+
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6567
native:rust_builtin native:backtrace
6668
DEPS_graphviz := std
6769
DEPS_green := std native:context_switch
@@ -82,7 +84,7 @@ DEPS_semver := std
8284
DEPS_uuid := std serialize
8385
DEPS_sync := core alloc rustrt collections
8486
DEPS_getopts := std
85-
DEPS_collections := core alloc
87+
DEPS_collections := core alloc unicode
8688
DEPS_fourcc := rustc syntax std
8789
DEPS_hexfloat := rustc syntax std
8890
DEPS_num := std
@@ -108,6 +110,7 @@ ONLY_RLIB_rlibc := 1
108110
ONLY_RLIB_alloc := 1
109111
ONLY_RLIB_rand := 1
110112
ONLY_RLIB_collections := 1
113+
ONLY_RLIB_unicode := 1
111114

112115
################################################################################
113116
# You should not need to edit below this line

branches/snap-stage3/mk/target.mk

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,6 @@ $(foreach host,$(CFG_HOST), \
6868
# $(4) is the crate name
6969
define RUST_TARGET_STAGE_N
7070

71-
# NOTE: after a stage0 snap this should be just EXTRA_FILENAME, not with a stage
72-
# or target bound
73-
EXTRA_FILENAME_$(1)_$(2) = -C extra-filename=-$$(CFG_FILENAME_EXTRA)
74-
ifeq ($(1),0)
75-
ifeq ($$(CFG_BUILD),$(2))
76-
EXTRA_FILENAME_$(1)_$(2) =
77-
endif
78-
endif
79-
8071
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
8172
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8273
$$(CRATEFILE_$(4)) \
@@ -95,7 +86,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9586
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
9687
$$(RUSTFLAGS_$(4)) \
9788
--out-dir $$(@D) \
98-
$$(EXTRA_FILENAME_$(1)_$(2)) \
89+
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9990
$$<
10091
@touch $$@
10192
$$(call LIST_ALL_OLD_GLOB_MATCHES,\

branches/snap-stage3/mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
# The names of crates that must be tested
1717

18-
# libcore tests are in a separate crate
18+
# libcore/libunicode tests are in a separate crate
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

22-
TEST_TARGET_CRATES = $(filter-out core,$(TARGET_CRATES)) coretest
22+
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
2424
TEST_HOST_CRATES = $(HOST_CRATES)
2525
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)

branches/snap-stage3/src/doc/guide.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,11 @@ is still a work in progress. However, it is already good enough to use for many
273273
Rust projects, and so it is assumed that Rust projects will use Cargo from the
274274
beginning.
275275

276-
Programmers love car analogies, so I've got a good one for you to think about
277-
the relationship between `cargo` and `rustc`: `rustc` is like a car, and
278-
`cargo` is like a robotic driver. You can drive your car yourself, of course,
279-
but isn't it just easier to let a computer drive it for you?
280-
281-
Anyway, Cargo manages three things: building your code, downloading the
282-
dependencies your code needs, and building the dependencies your code needs.
283-
At first, your program doesn't have any dependencies, so we'll only be using
284-
the first part of its functionality. Eventually, we'll add more. Since we
285-
started off by using Cargo, it'll be easy to add later.
276+
Cargo manages three things: building your code, downloading the dependencies
277+
your code needs, and building the dependencies your code needs. At first, your
278+
program doesn't have any dependencies, so we'll only be using the first part of
279+
its functionality. Eventually, we'll add more. Since we started off by using
280+
Cargo, it'll be easy to add later.
286281

287282
Let's convert Hello World to Cargo. The first thing we need to do to begin using Cargo
288283
is to install Cargo. To do this, we need to build it from source. There are no binaries

branches/snap-stage3/src/etc/install.sh

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,19 @@ then
285285
CFG_LIBDIR_RELATIVE=bin
286286
fi
287287

288+
if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
289+
then
290+
CFG_LD_PATH_VAR=PATH
291+
CFG_OLD_LD_PATH_VAR=$PATH
292+
elif [ "$CFG_OSTYPE" = "Darwin" ]
293+
then
294+
CFG_LD_PATH_VAR=DYLD_LIBRARY_PATH
295+
CFG_OLD_LD_PATH_VAR=$DYLD_LIBRARY_PATH
296+
else
297+
CFG_LD_PATH_VAR=LD_LIBRARY_PATH
298+
CFG_OLD_LD_PATH_VAR=$LD_LIBRARY_PATH
299+
fi
300+
288301
flag uninstall "only uninstall from the installation prefix"
289302
opt verify 1 "verify that the installed binaries run correctly"
290303
valopt prefix "/usr/local" "set installation prefix"
@@ -312,11 +325,13 @@ then
312325
if [ -z "${CFG_UNINSTALL}" ]
313326
then
314327
msg "verifying platform can run binaries"
328+
export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/lib":$CFG_OLD_LD_PATH_VAR
315329
"${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
316330
if [ $? -ne 0 ]
317331
then
318332
err "can't execute rustc binary on this platform"
319333
fi
334+
export $CFG_LD_PATH_VAR=$CFG_OLD_LD_PATH_VAR
320335
fi
321336
fi
322337

@@ -452,17 +467,31 @@ while read p; do
452467
done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in"
453468

454469
# Sanity check: can we run the installed binaries?
470+
#
471+
# As with the verification above, make sure the right LD_LIBRARY_PATH-equivalent
472+
# is in place. Try first without this variable, and if that fails try again with
473+
# the variable. If the second time tries, print a hopefully helpful message to
474+
# add something to the appropriate environment variable.
455475
if [ -z "${CFG_DISABLE_VERIFY}" ]
456476
then
457477
msg "verifying installed binaries are executable"
458-
"${CFG_PREFIX}/bin/rustc" --version > /dev/null
478+
"${CFG_PREFIX}/bin/rustc" --version 2> /dev/null 1> /dev/null
459479
if [ $? -ne 0 ]
460480
then
461-
ERR="can't execute installed rustc binary. "
462-
ERR="${ERR}installation may be broken. "
463-
ERR="${ERR}if this is expected then rerun install.sh with \`--disable-verify\` "
464-
ERR="${ERR}or \`make install\` with \`--disable-verify-install\`"
465-
err "${ERR}"
481+
export $CFG_LD_PATH_VAR="${CFG_PREFIX}/lib":$CFG_OLD_LD_PATH_VAR
482+
"${CFG_PREFIX}/bin/rustc" --version > /dev/null
483+
if [ $? -ne 0 ]
484+
then
485+
ERR="can't execute installed rustc binary. "
486+
ERR="${ERR}installation may be broken. "
487+
ERR="${ERR}if this is expected then rerun install.sh with \`--disable-verify\` "
488+
ERR="${ERR}or \`make install\` with \`--disable-verify-install\`"
489+
err "${ERR}"
490+
else
491+
echo
492+
echo " please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
493+
echo
494+
fi
466495
fi
467496
fi
468497

branches/snap-stage3/src/etc/regex-unicode-tables.py

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)