Skip to content

Commit bbc51ff

Browse files
committed
---
yaml --- r: 161371 b: refs/heads/snap-stage3 c: 4653ad0 h: refs/heads/master i: 161369: cc292ac 161367: 76cb486 v: v3
1 parent ae65629 commit bbc51ff

File tree

499 files changed

+13628
-12321
lines changed

Some content is hidden

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

499 files changed

+13628
-12321
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: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 9c27ab6125278ef6bf309959f3de2791802e0778
4+
refs/heads/snap-stage3: 4653ad02055e1accae0fce6aad000b01fbe61d20
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ Cole Mickens <[email protected]>
121121
Colin Davidson <[email protected]>
122122
Colin Sherratt <[email protected]>
123123
Conrad Kleinespel <[email protected]>
124-
Corey Farwell <[email protected]>
125124
Corey Ford <[email protected]>
126125
Corey Richardson <[email protected]>
127126

branches/snap-stage3/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ include $(CFG_SRC_DIR)mk/rustllvm.mk
198198
include $(CFG_SRC_DIR)mk/docs.mk
199199
# LLVM
200200
include $(CFG_SRC_DIR)mk/llvm.mk
201-
# Rules for installing debugger scripts
202-
include $(CFG_SRC_DIR)mk/debuggers.mk
203201

204202
######################################################################
205203
# Secondary makefiles, conditionalized for speed

branches/snap-stage3/configure

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -546,27 +546,13 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
546546
# there's no rpath. This is where the build system itself puts libraries;
547547
# --libdir is used to configure the installation directory.
548548
# FIXME: This needs to parameterized over target triples. Do it in platform.mk
549+
CFG_LIBDIR_RELATIVE=lib
549550
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
550551
then
551552
CFG_LIBDIR_RELATIVE=bin
552-
else
553-
CFG_LIBDIR_RELATIVE=lib
554553
fi
555554

556-
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)"
557-
558-
case "$CFG_LIBDIR" in
559-
"$CFG_PREFIX"/*) CAT_INC=2;;
560-
"$CFG_PREFIX"*) CAT_INC=1;;
561-
*)
562-
err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
563-
esac
564-
565-
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
566-
567-
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] && [ "$CFG_LIBDIR_RELATIVE" != "bin" ]; then
568-
err "libdir on windows should be set to 'bin'"
569-
fi
555+
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
570556

571557
if [ $HELP -eq 1 ]
572558
then
@@ -624,6 +610,7 @@ probe CFG_LD ld
624610
probe CFG_VALGRIND valgrind
625611
probe CFG_PERF perf
626612
probe CFG_ISCC iscc
613+
probe CFG_LLNEXTGEN LLnextgen
627614
probe CFG_JAVAC javac
628615
probe CFG_ANTLR4 antlr4
629616
probe CFG_GRUN grun
@@ -714,6 +701,11 @@ then
714701
fi
715702
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
716703
putvar CFG_LOCAL_RUST_ROOT
704+
else
705+
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
706+
then
707+
warn "Use of --local-rust-root without --enable-local-rust"
708+
fi
717709
fi
718710

719711
# Force freebsd to build with clang; gcc doesn't like us there
@@ -891,10 +883,7 @@ CFG_PREFIX=${CFG_PREFIX%/}
891883
CFG_MANDIR=${CFG_MANDIR%/}
892884
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
893885
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
894-
CFG_SUPPORTED_TARGET=""
895-
for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
896-
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
897-
done
886+
CFG_SUPPORTED_TARGET="$(ls ${CFG_SRC_DIR}mk/cfg)"
898887

899888
# copy host-triples to target-triples so that hosts are a subset of targets
900889
V_TEMP=""
@@ -1000,15 +989,6 @@ for h in $CFG_HOST
1000989
do
1001990
for t in $CFG_TARGET
1002991
do
1003-
# host lib dir stage0
1004-
make_dir $h/stage0/lib
1005-
1006-
# target bin dir stage0
1007-
make_dir $h/stage0/lib/rustlib/$t/bin
1008-
1009-
# target lib dir stage0
1010-
make_dir $h/stage0/lib/rustlib/$t/lib
1011-
1012992
for i in 0 1 2 3
1013993
do
1014994
# host bin dir

branches/snap-stage3/mk/clean.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ clean-generic-$(2)-$(1):
6363
-name '*.lib' -o \
6464
-name '*.dll' -o \
6565
-name '*.def' -o \
66-
-name '*.py' -o \
6766
-name '*.bc' \
6867
\) \
6968
| xargs rm -f
@@ -79,7 +78,7 @@ define CLEAN_HOST_STAGE_N
7978

8079
clean$(1)_H_$(2): \
8180
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
82-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
81+
$$(foreach tool,$$(TOOLS),clean$(1)_H_$(2)-tool-$$(tool))
8382
$$(Q)rm -fr $(2)/rt/libbacktrace
8483

8584
clean$(1)_H_$(2)-tool-%:
@@ -99,7 +98,7 @@ define CLEAN_TARGET_STAGE_N
9998

10099
clean$(1)_T_$(2)_H_$(3): \
101100
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
102-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
101+
$$(foreach tool,$$(TOOLS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103102
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104103
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105104
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix

branches/snap-stage3/mk/crates.mk

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#
3838
# DEPS_<crate>
3939
# These lists are the dependencies of the <crate> that is to be built.
40-
# Rust dependencies are listed bare (i.e. std) and native
40+
# Rust dependencies are listed bare (i.e. std, green) and native
4141
# dependencies have a "native:" prefix (i.e. native:hoedown). All deps
4242
# will be built before the crate itself is built.
4343
#
@@ -49,8 +49,8 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std flate arena term \
53-
serialize getopts collections test time rand \
52+
TARGET_CRATES := libc std green native flate arena term \
53+
serialize sync getopts collections test time rand \
5454
log regex graphviz core rbml alloc rustrt \
5555
unicode
5656
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
@@ -63,9 +63,11 @@ DEPS_libc := core
6363
DEPS_unicode := core
6464
DEPS_alloc := core libc native:jemalloc
6565
DEPS_rustrt := alloc core libc collections native:rustrt_native
66-
DEPS_std := core libc rand alloc collections rustrt unicode \
66+
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6767
native:rust_builtin native:backtrace
6868
DEPS_graphviz := std
69+
DEPS_green := std native:context_switch
70+
DEPS_native := std
6971
DEPS_syntax := std term serialize log fmt_macros arena libc
7072
DEPS_rustc_trans := rustc rustc_back rustc_llvm libc
7173
DEPS_rustc := syntax flate arena serialize getopts rbml \
@@ -81,6 +83,7 @@ DEPS_glob := std
8183
DEPS_serialize := std log
8284
DEPS_rbml := std log serialize
8385
DEPS_term := std log
86+
DEPS_sync := core alloc rustrt collections
8487
DEPS_getopts := std
8588
DEPS_collections := core alloc unicode
8689
DEPS_num := std
@@ -92,9 +95,9 @@ DEPS_regex := std
9295
DEPS_regex_macros = rustc syntax std regex
9396
DEPS_fmt_macros = std
9497

95-
TOOL_DEPS_compiletest := test getopts
96-
TOOL_DEPS_rustdoc := rustdoc
97-
TOOL_DEPS_rustc := rustc_trans
98+
TOOL_DEPS_compiletest := test getopts native
99+
TOOL_DEPS_rustdoc := rustdoc native
100+
TOOL_DEPS_rustc := rustc_trans native
98101
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
99102
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
100103
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs

branches/snap-stage3/mk/debuggers.mk

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

branches/snap-stage3/mk/docs.mk

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,26 @@ endef
246246
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
247247

248248

249+
######################################################################
250+
# LLnextgen (grammar analysis from refman)
251+
######################################################################
252+
253+
ifeq ($(CFG_LLNEXTGEN),)
254+
$(info cfg: no llnextgen found, omitting grammar-verification)
255+
else
256+
.PHONY: verify-grammar
257+
258+
doc/rust.g: $(D)/rust.md $(S)src/etc/extract_grammar.py
259+
@$(call E, extract_grammar: $@)
260+
$(Q)$(CFG_PYTHON) $(S)src/etc/extract_grammar.py $< >$@
261+
262+
verify-grammar: doc/rust.g
263+
@$(call E, LLnextgen: $<)
264+
$(Q)$(CFG_LLNEXTGEN) --generate-lexer-wrapper=no $< >$@
265+
$(Q)rm -f doc/rust.c doc/rust.h
266+
endif
267+
268+
249269
######################################################################
250270
# Rustdoc (libstd/extra)
251271
######################################################################
@@ -279,8 +299,7 @@ $(2) += doc/$(1)/index.html
279299
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
280300
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
281301
@$$(call E, rustdoc: $$@)
282-
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(CFG_BUILD)) \
283-
$$(RUSTDOC) --cfg dox --cfg stage2 $$<
302+
$$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<
284303
endef
285304

286305
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))

branches/snap-stage3/mk/llvm.mk

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ else
4949
LLVM_STDCPP_LOCATION_$(1) =
5050
endif
5151

52-
53-
# LLVM linkage:
54-
LLVM_LINKAGE_PATH_$(1):=$$(abspath $$(RT_OUTPUT_DIR_$(1))/llvmdeps.rs)
55-
$$(LLVM_LINKAGE_PATH_$(1)): $(S)src/etc/mklldeps.py $$(LLVM_CONFIG_$(1))
56-
$(Q)$(CFG_PYTHON) "$$<" "$$@" "$$(LLVM_COMPONENTS)" "$$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
57-
$$(LLVM_CONFIG_$(1))
5852
endef
5953

6054
$(foreach host,$(CFG_HOST), \
@@ -63,14 +57,10 @@ $(foreach host,$(CFG_HOST), \
6357
$(foreach host,$(CFG_HOST), \
6458
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
6559

66-
# This can't be done in target.mk because it's included before this file.
67-
define LLVM_LINKAGE_DEPS
68-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $$(LLVM_LINKAGE_PATH_$(3))
69-
endef
70-
71-
$(foreach source,$(CFG_HOST), \
72-
$(foreach target,$(CFG_TARGET), \
73-
$(eval $(call LLVM_LINKAGE_DEPS,0,$(target),$(source))) \
74-
$(eval $(call LLVM_LINKAGE_DEPS,1,$(target),$(source))) \
75-
$(eval $(call LLVM_LINKAGE_DEPS,2,$(target),$(source))) \
76-
$(eval $(call LLVM_LINKAGE_DEPS,3,$(target),$(source)))))
60+
$(S)src/librustc_llvm/llvmdeps.rs: \
61+
$(LLVM_CONFIGS) \
62+
$(S)src/etc/mklldeps.py \
63+
$(MKFILE_DEPS)
64+
$(Q)$(CFG_PYTHON) $(S)src/etc/mklldeps.py \
65+
"$@" "$(LLVM_COMPONENTS)" "$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
66+
$(LLVM_CONFIGS)

branches/snap-stage3/mk/main.mk

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,11 @@ endif
190190
# Target-and-rule "utility variables"
191191
######################################################################
192192

193-
define DEF_FOR_TARGET
193+
define DEF_X
194194
X_$(1) := $(CFG_EXE_SUFFIX_$(1))
195-
ifndef CFG_LLVM_TARGET_$(1)
196-
CFG_LLVM_TARGET_$(1) := $(1)
197-
endif
198195
endef
199196
$(foreach target,$(CFG_TARGET), \
200-
$(eval $(call DEF_FOR_TARGET,$(target))))
197+
$(eval $(call DEF_X,$(target))))
201198

202199
# "Source" files we generate in builddir along the way.
203200
GENERATED :=
@@ -335,15 +332,7 @@ define SREQ
335332
# Destinations of artifacts for the host compiler
336333
HROOT$(1)_H_$(3) = $(3)/stage$(1)
337334
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
338-
ifeq ($$(CFG_WINDOWSY_$(3)),1)
339-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
340-
else
341-
ifeq ($(1),0)
342-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
343-
else
344335
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
345-
endif
346-
endif
347336

348337
# Destinations of artifacts for target architectures
349338
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
@@ -356,8 +345,7 @@ HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
356345
else
357346
HSREQ$(1)_H_$(3) = \
358347
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359-
$$(MKFILE_DEPS) \
360-
tmp/install-debugger-scripts$(1)_H_$(3).done
348+
$$(MKFILE_DEPS)
361349
endif
362350

363351
# Prerequisites for using the stageN compiler to build target artifacts
@@ -371,8 +359,7 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
371359
SREQ$(1)_T_$(2)_H_$(3) = \
372360
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373361
$$(foreach dep,$$(TARGET_CRATES), \
374-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
362+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep))
376363

377364
# Prerequisites for a working stageN compiler and complete set of target
378365
# libraries

branches/snap-stage3/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ $(foreach cvar,CC CXX CPP CFLAGS CXXFLAGS CPPFLAGS, \
113113

114114
CFG_RLIB_GLOB=lib$(1)-*.rlib
115115

116-
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*.mk)
116+
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*)
117117

118118
# The -Qunused-arguments sidesteps spurious warnings from clang
119119
define FILTER_FLAGS

0 commit comments

Comments
 (0)