Skip to content

Commit d60226f

Browse files
committed
---
yaml --- r: 275007 b: refs/heads/stable c: 9f0e39b h: refs/heads/master i: 275005: 687d7f4 275003: 4598fb0 274999: 34e63f7 274991: 009851c 274975: bd534fe 274943: 824be1d
1 parent dade2af commit d60226f

File tree

544 files changed

+15839
-7674
lines changed

Some content is hidden

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

544 files changed

+15839
-7674
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 1536195ce66dcf764782e1f36ced4aa5eefef321
32+
refs/heads/stable: 9f0e39ba16a319e5d30f16c579e3fa205824862b
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*.elc
1818
*.epub
1919
*.exe
20+
*.pdb
2021
*.fn
2122
*.html
2223
*.kdev4
@@ -93,3 +94,4 @@ tmp.*.rs
9394
version.md
9495
version.ml
9596
version.texi
97+
/target

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Read ["Installing Rust"] from [The Book].
1717
1. Make sure you have installed the dependencies:
1818

1919
* `g++` 4.7 or `clang++` 3.x
20-
* `python` 2.7 or later (but not 3.x)
20+
* `python` 2.7 (but not 3.x)
2121
* GNU `make` 3.81 or later
2222
* `curl`
2323
* `git`

branches/stable/configure

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ opt stage0-landing-pads 1 "enable landing pads during bootstrap with stage0"
606606
opt dist-host-only 0 "only install bins for the host architecture"
607607
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
608608
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609+
opt rustbuild 0 "use the rust and cargo based build system"
609610

610611
# Optimization and debugging options. These may be overridden by the release channel, etc.
611612
opt_nosave optimize 1 "build optimized rust code"
@@ -625,7 +626,7 @@ valopt llvm-root "" "set LLVM root"
625626
valopt python "" "set path to python"
626627
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
627628
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
628-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
629+
valopt android-cross-path "" "Android NDK standalone path (deprecated)"
629630
valopt i686-linux-android-ndk "" "i686-linux-android NDK standalone path"
630631
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
631632
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
@@ -728,12 +729,12 @@ step_msg "looking for build programs"
728729

729730
probe_need CFG_CURLORWGET curl wget
730731
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
731-
probe_need CFG_PYTHON python2.7 python2.6 python2 python
732+
probe_need CFG_PYTHON python2.7 python2 python
732733
fi
733734

734735
python_version=$($CFG_PYTHON -V 2>&1)
735-
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
736-
err "Found $python_version, but LLVM requires Python 2.4-2.7"
736+
if [ $(echo $python_version | grep -c '^Python 2\.7') -ne 1 ]; then
737+
err "Found $python_version, but Python 2.7 is required"
737738
fi
738739

739740
# If we have no git directory then we are probably a tarball distribution
@@ -1422,7 +1423,7 @@ done
14221423
step_msg "configuring submodules"
14231424

14241425
# Have to be in the top of src directory for this
1425-
if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ]
1426+
if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ] && [ -z $CFG_ENABLE_RUSTBUILD ]
14261427
then
14271428
cd ${CFG_SRC_DIR}
14281429

@@ -1481,7 +1482,11 @@ do
14811482
;;
14821483
esac
14831484

1484-
if [ -z $CFG_LLVM_ROOT ]
1485+
if [ -n "$CFG_ENABLE_RUSTBUILD" ]
1486+
then
1487+
msg "not configuring LLVM, rustbuild in use"
1488+
do_reconfigure=0
1489+
elif [ -z $CFG_LLVM_ROOT ]
14851490
then
14861491
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
14871492
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
@@ -1812,8 +1817,15 @@ do
18121817
putvar $CFG_LLVM_INST_DIR
18131818
done
18141819

1820+
if [ -n "$CFG_ENABLE_RUSTBUILD" ]
1821+
then
1822+
INPUT_MAKEFILE=src/bootstrap/mk/Makefile.in
1823+
else
1824+
INPUT_MAKEFILE=Makefile.in
1825+
fi
1826+
18151827
msg
1816-
copy_if_changed ${CFG_SRC_DIR}Makefile.in ./Makefile
1828+
copy_if_changed ${CFG_SRC_DIR}${INPUT_MAKEFILE} ./Makefile
18171829
move_if_changed config.tmp config.mk
18181830
rm -f config.tmp
18191831
touch config.stamp
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# i586-unknown-linux-gnu configuration
2+
CC_i586-unknown-linux-gnu=$(CC)
3+
CXX_i586-unknown-linux-gnu=$(CXX)
4+
CPP_i586-unknown-linux-gnu=$(CPP)
5+
AR_i586-unknown-linux-gnu=$(AR)
6+
CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
7+
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
8+
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
13+
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
14+
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
15+
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=
16+
CFG_INSTALL_NAME_i586-unknown-linux-gnu =
17+
CFG_EXE_SUFFIX_i586-unknown-linux-gnu =
18+
CFG_WINDOWSY_i586-unknown-linux-gnu :=
19+
CFG_UNIXY_i586-unknown-linux-gnu := 1
20+
CFG_LDPATH_i586-unknown-linux-gnu :=
21+
CFG_RUN_i586-unknown-linux-gnu=$(2)
22+
CFG_RUN_TARG_i586-unknown-linux-gnu=$(call CFG_RUN_i586-unknown-linux-gnu,,$(2))
23+
CFG_GNU_TRIPLE_i586-unknown-linux-gnu := i586-unknown-linux-gnu

branches/stable/mk/crates.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes
6161
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
62-
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
62+
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6363

6464
DEPS_core :=
6565
DEPS_alloc := core libc alloc_system
@@ -120,12 +120,12 @@ TOOL_DEPS_compiletest := test getopts
120120
TOOL_DEPS_rustdoc := rustdoc
121121
TOOL_DEPS_rustc := rustc_driver
122122
TOOL_DEPS_rustbook := std rustdoc
123-
TOOL_DEPS_error-index-generator := rustdoc syntax serialize
123+
TOOL_DEPS_error_index_generator := rustdoc syntax serialize
124124
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
125125
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
126126
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
127127
TOOL_SOURCE_rustbook := $(S)src/rustbook/main.rs
128-
TOOL_SOURCE_error-index-generator := $(S)src/error-index-generator/main.rs
128+
TOOL_SOURCE_error_index_generator := $(S)src/error_index_generator/main.rs
129129

130130
ONLY_RLIB_core := 1
131131
ONLY_RLIB_libc := 1
@@ -144,8 +144,7 @@ TARGET_CRATES += alloc_jemalloc
144144
DEPS_std += alloc_jemalloc
145145
DEPS_alloc_jemalloc := core libc native:jemalloc
146146
ONLY_RLIB_alloc_jemalloc := 1
147-
else
148-
RUSTFLAGS_rustc_back := --cfg disable_jemalloc
147+
RUSTFLAGS_rustc_back := --cfg 'feature="jemalloc"'
149148
endif
150149

151150
################################################################################

branches/stable/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PKG_FILES := \
5252
doc \
5353
driver \
5454
etc \
55-
error-index-generator \
55+
error_index_generator \
5656
$(foreach crate,$(CRATES),lib$(crate)) \
5757
libcollectionstest \
5858
libcoretest \

branches/stable/mk/docs.mk

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
5959
# ./configure
6060
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
6161

62-
# The error-index-generator executable...
63-
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD))
62+
# The error_index_generator executable...
63+
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error_index_generator$(X_$(CFG_BUILD))
6464
ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
65+
ERR_IDX_GEN_MD = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE) markdown
6566

6667
D := $(S)src/doc
6768

@@ -217,6 +218,12 @@ doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
217218

218219
error-index: doc/error-index.html
219220

220-
doc/error-index.html: $(ERR_IDX_GEN_EXE) | doc/
221-
$(Q)$(call E, error-index-generator: $@)
221+
# Metadata used to generate the index is created as a side effect of
222+
# the build so this depends on every crate being up to date.
223+
doc/error-index.html: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
224+
$(Q)$(call E, error_index_generator: $@)
222225
$(Q)$(ERR_IDX_GEN)
226+
227+
doc/error-index.md: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
228+
$(Q)$(call E, error_index_generator: $@)
229+
$(Q)$(ERR_IDX_GEN_MD)

branches/stable/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $(foreach host,$(CFG_HOST), \
102102
define LLVM_LINKAGE_DEPS
103103
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $$(LLVM_LINKAGE_PATH_$(2))
104104
RUSTFLAGS$(1)_rustc_llvm_T_$(2) += $$(shell echo $$(LLVM_ALL_COMPONENTS_$(2)) | tr '-' '_' |\
105-
sed -e 's/^ //;s/\([^ ]*\)/\-\-cfg have_component_\1/g')
105+
sed -e 's/^ //;s/\([^ ]*\)/\-\-cfg "llvm_component=\\"\1\\""/g')
106106
endef
107107

108108
$(foreach source,$(CFG_HOST), \

branches/stable/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ define PREPARE_MAN
8282

8383
endef
8484

85-
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))
85+
PREPARE_TOOLS = $(filter-out compiletest rustbook error_index_generator, $(TOOLS))
8686

8787

8888
# $(1) is tool

branches/stable/mk/rt.mk

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,15 @@ ifeq ($$(CFG_WINDOWSY_$(1)),1)
148148
else ifeq ($(OSTYPE_$(1)), apple-ios)
149149
JEMALLOC_ARGS_$(1) := --disable-tls
150150
else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
151-
JEMALLOC_ARGS_$(1) := --disable-tls
151+
# We force android to have prefixed symbols because apparently replacement of
152+
# the libc allocator doesn't quite work. When this was tested (unprefixed
153+
# symbols), it was found that the `realpath` function in libc would allocate
154+
# with libc malloc (not jemalloc malloc), and then the standard library would
155+
# free with jemalloc free, causing a segfault.
156+
#
157+
# If the test suite passes, however, without symbol prefixes then we should be
158+
# good to go!
159+
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
152160
endif
153161

154162
ifdef CFG_ENABLE_DEBUG_JEMALLOC
@@ -186,7 +194,7 @@ JEMALLOC_LOCAL_$(1) := $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1
186194
$$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
187195
@$$(call E, make: jemalloc)
188196
cd "$$(JEMALLOC_BUILD_DIR_$(1))"; "$(S)src/jemalloc/configure" \
189-
$$(JEMALLOC_ARGS_$(1)) --with-jemalloc-prefix=je_ $(CFG_JEMALLOC_FLAGS) \
197+
$$(JEMALLOC_ARGS_$(1)) $(CFG_JEMALLOC_FLAGS) \
190198
--build=$$(CFG_GNU_TRIPLE_$(CFG_BUILD)) --host=$$(CFG_GNU_TRIPLE_$(1)) \
191199
CC="$$(CC_$(1)) $$(CFG_JEMALLOC_CFLAGS_$(1))" \
192200
AR="$$(AR_$(1))" \

branches/stable/mk/tests.mk

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,14 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
298298
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
299299
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
300300
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
301-
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
302-
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
303-
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
301+
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
302+
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
303+
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
304304
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
305305
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
307-
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
308-
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
307+
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
308+
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
309309
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
310310
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
311311
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
@@ -673,8 +673,8 @@ CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
673673
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
674674
CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS)
675675
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
676-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
677-
$(S)src/etc/htmldocck.py
676+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
677+
$(S)src/etc/htmldocck.py
678678

679679
endef
680680

@@ -892,6 +892,28 @@ $(foreach host,$(CFG_HOST), \
892892
$(foreach crate,$(TEST_DOC_CRATES), \
893893
$(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate)))))))
894894

895+
define DEF_DOC_TEST_ERROR_INDEX
896+
897+
check-stage$(1)-T-$(2)-H-$(3)-doc-error-index-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index)
898+
899+
ifeq ($(2),$$(CFG_BUILD))
900+
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index): \
901+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
902+
doc/error-index.md
903+
$$(Q)touch $$@.start_time
904+
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test doc/error-index.md
905+
$$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
906+
else
907+
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index):
908+
$$(Q)touch $$@
909+
endif
910+
endef
911+
912+
$(foreach host,$(CFG_HOST), \
913+
$(foreach target,$(CFG_TARGET), \
914+
$(foreach stage,$(STAGES), \
915+
$(eval $(call DEF_DOC_TEST_ERROR_INDEX,$(stage),$(target),$(host))))))
916+
895917
######################################################################
896918
# Shortcut rules
897919
######################################################################
@@ -901,7 +923,7 @@ TEST_GROUPS = \
901923
$(foreach crate,$(TEST_CRATES),$(crate)) \
902924
$(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
903925
rpass \
904-
rpass-valgrind \
926+
rpass-valgrind \
905927
rpass-full \
906928
rfail-full \
907929
cfail-full \
@@ -918,7 +940,7 @@ TEST_GROUPS = \
918940
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \
919941
pretty \
920942
pretty-rpass \
921-
pretty-rpass-valgrind \
943+
pretty-rpass-valgrind \
922944
pretty-rpass-full \
923945
pretty-rfail-full \
924946
pretty-rfail \
@@ -987,7 +1009,8 @@ define DEF_CHECK_DOC_FOR_STAGE
9871009
check-stage$(1)-docs: $$(foreach docname,$$(DOC_NAMES), \
9881010
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
9891011
$$(foreach crate,$$(TEST_DOC_CRATES), \
990-
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate))
1012+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate)) \
1013+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-error-index-exec
9911014
endef
9921015

9931016
$(foreach stage,$(STAGES), \
@@ -1048,7 +1071,9 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10481071
$$(S) \
10491072
$(3) \
10501073
"$$(LLVM_LIBDIR_RUSTFLAGS_$(3))" \
1051-
"$$(LLVM_ALL_COMPONENTS_$(3))"
1074+
"$$(LLVM_ALL_COMPONENTS_$(3))" \
1075+
"$$(LLVM_CXXFLAGS_$(3))" \
1076+
'$$(CXX_$(3))'
10521077
@touch -r $$@.start_time $$@ && rm $$@.start_time
10531078
else
10541079
# FIXME #11094 - The above rule doesn't work right for multiple targets

0 commit comments

Comments
 (0)