Skip to content

Commit 20e73a9

Browse files
committed
---
yaml --- r: 156536 b: refs/heads/master c: 172b59a h: refs/heads/master v: v3
1 parent 8b20224 commit 20e73a9

File tree

744 files changed

+8526
-18359
lines changed

Some content is hidden

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

744 files changed

+8526
-18359
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0c18da503ca674eb4cbf8504b52afb2d7c242ae5
2+
refs/heads/master: 172b59abe510dde5826fec24377f208a19418c04
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
55
refs/heads/try: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75

trunk/configure

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ VAL_OPTIONS=""
411411

412412
opt valgrind 0 "run tests with valgrind (memcheck by default)"
413413
opt helgrind 0 "run tests with helgrind instead of memcheck"
414+
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
414415
opt docs 1 "build documentation"
415416
opt optimize 1 "build optimized rust code"
416417
opt optimize-cxx 1 "build optimized C++ code"
@@ -906,6 +907,7 @@ do
906907
done
907908

908909
make_dir $h/test/run-pass
910+
make_dir $h/test/run-pass-valgrind
909911
make_dir $h/test/run-pass-fulldeps
910912
make_dir $h/test/run-fail
911913
make_dir $h/test/compile-fail
@@ -1235,15 +1237,6 @@ then
12351237
putvar CFG_PANDOC
12361238
fi
12371239

1238-
# Valgrind is only reliable on Linux. On Windows it doesn't work at all, and
1239-
# on the Mac the dynamic linker causes Valgrind to emit a huge stream of
1240-
# errors.
1241-
if [ $CFG_OSTYPE != unknown-linux-gnu ] && [ $CFG_OSTYPE != apple-darwin ]
1242-
then
1243-
CFG_BAD_VALGRIND=1
1244-
putvar CFG_BAD_VALGRIND
1245-
fi
1246-
12471240
putvar CFG_LLVM_ROOT
12481241
putvar CFG_LLVM_SRC_DIR
12491242

trunk/mk/crates.mk

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std green native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rbml rlibc alloc debug rustrt \
52+
TARGET_CRATES := libc std green native flate arena term \
53+
serialize sync getopts collections test time rand \
54+
log regex graphviz core rbml rlibc alloc rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
56+
HOST_CRATES := syntax rustc rustdoc regex_macros fmt_macros \
5757
rustc_llvm rustc_back
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
@@ -63,39 +63,33 @@ DEPS_libc := core
6363
DEPS_rlibc := core
6464
DEPS_unicode := core
6565
DEPS_alloc := core libc native:jemalloc
66-
DEPS_debug := std
6766
DEPS_rustrt := alloc core libc collections native:rustrt_native
6867
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6968
native:rust_builtin native:backtrace
7069
DEPS_graphviz := std
7170
DEPS_green := std native:context_switch
7271
DEPS_native := std
73-
DEPS_syntax := std term serialize log fmt_macros debug arena libc
72+
DEPS_syntax := std term serialize log fmt_macros arena libc
7473
DEPS_rustc := syntax flate arena serialize getopts rbml \
75-
time log graphviz debug rustc_llvm rustc_back
74+
time log graphviz rustc_llvm rustc_back
7675
DEPS_rustc_llvm := native:rustllvm libc std
7776
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7877
DEPS_rustdoc := rustc native:hoedown serialize getopts \
79-
test time debug
78+
test time
8079
DEPS_flate := std native:miniz
8180
DEPS_arena := std
8281
DEPS_graphviz := std
8382
DEPS_glob := std
8483
DEPS_serialize := std log
8584
DEPS_rbml := std log serialize
8685
DEPS_term := std log
87-
DEPS_semver := std
88-
DEPS_uuid := std serialize
8986
DEPS_sync := core alloc rustrt collections
9087
DEPS_getopts := std
9188
DEPS_collections := core alloc unicode
92-
DEPS_fourcc := rustc syntax std
93-
DEPS_hexfloat := rustc syntax std
9489
DEPS_num := std
9590
DEPS_test := std getopts serialize rbml term time regex native:rust_test_helpers
9691
DEPS_time := std serialize
9792
DEPS_rand := core
98-
DEPS_url := std
9993
DEPS_log := std regex
10094
DEPS_regex := std
10195
DEPS_regex_macros = rustc syntax std regex

trunk/mk/install.mk

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,34 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
17+
install:
18+
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
19+
# Build the dist as the original user
20+
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_install
21+
else
22+
$(Q)$(MAKE) prepare_install
23+
endif
1824
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
19-
# Remove tmp files while we can because they may have been created under sudo
25+
# Remove tmp files because it's a decent amount of disk space
2026
$(Q)rm -R tmp/dist
2127

22-
uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
28+
prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
29+
30+
uninstall:
31+
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
32+
# Build the dist as the original user
33+
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_uninstall
34+
else
35+
$(Q)$(MAKE) prepare_uninstall
36+
endif
2337
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
24-
# Remove tmp files while we can because they may have been created under sudo
38+
# Remove tmp files because it's a decent amount of disk space
2539
$(Q)rm -R tmp/dist
2640

41+
prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
42+
43+
.PHONY: install prepare_install uninstall prepare_uninstall
44+
2745
tmp/empty_dir:
2846
mkdir -p $@
2947

trunk/mk/main.mk

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
157157
# by not emitting them.
158158
RUSTFLAGS_STAGE0 += -Z no-landing-pads
159159

160+
# Go fast for stage0, and also for stage1/stage2 if optimization is off.
161+
RUSTFLAGS_STAGE0 += -C codegen-units=4
162+
ifdef CFG_DISABLE_OPTIMIZE
163+
RUSTFLAGS_STAGE1 += -C codegen-units=4
164+
RUSTFLAGS_STAGE2 += -C codegen-units=4
165+
endif
166+
160167
# platform-specific auto-configuration
161168
include $(CFG_SRC_DIR)mk/platform.mk
162169

@@ -167,16 +174,20 @@ else
167174
CFG_VALGRIND_COMPILE :=
168175
endif
169176

177+
178+
ifndef CFG_DISABLE_VALGRIND_RPASS
179+
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
180+
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
181+
else
182+
CFG_VALGRIND_RPASS :=
183+
endif
184+
185+
170186
ifdef CFG_ENABLE_VALGRIND
171187
$(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
172188
else
173189
CFG_VALGRIND :=
174190
endif
175-
ifdef CFG_BAD_VALGRIND
176-
$(info cfg: disabling valgrind due to its unreliability on this platform)
177-
CFG_VALGRIND :=
178-
endif
179-
180191

181192
######################################################################
182193
# Target-and-rule "utility variables"

trunk/mk/platform.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ ifdef CFG_VALGRIND
5858
endif
5959
endif
6060

61+
# If we actually want to run Valgrind on a given platform, set this variable
62+
define DEF_GOOD_VALGRIND
63+
ifeq ($(OSTYPE_$(1)),unknown-linux-gnu)
64+
GOOD_VALGRIND_$(1) = 1
65+
endif
66+
ifneq (,$(filter $(OSTYPE_$(1)),darwin freebsd))
67+
ifeq (HOST_$(1),x86_64)
68+
GOOD_VALGRIND_$(1) = 1
69+
endif
70+
endif
71+
endef
72+
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
73+
$(foreach t,$(CFG_TARGET),$(info cfg: good valgrind for $(t) is $(GOOD_VALGRIND_$(t))))
74+
6175
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
6276
ifdef CFG_PERF
6377
ifneq ($(CFG_PERF_WITH_LOGFD),)

trunk/mk/rt.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,15 @@ endif
284284
# ./configure script. This is done to force libbacktrace to *not* use the
285285
# atomic/sync functionality because it pulls in unnecessary dependencies and we
286286
# never use it anyway.
287-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: \
288-
export CFLAGS:=$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) \
289-
-fno-stack-protector
290-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export CC:=$$(CC_$(1))
291-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export AR:=$$(AR_$(1))
292-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export RANLIB:=$$(AR_$(1)) s
293287
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
288+
@$$(call E, configure: libbacktrace for $(1))
294289
$$(Q)rm -rf $$(BACKTRACE_BUILD_DIR_$(1))
295290
$$(Q)mkdir -p $$(BACKTRACE_BUILD_DIR_$(1))
296291
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && \
292+
CC="$$(CC_$(1))" \
293+
AR="$$(AR_$(1))" \
294+
RANLIB="$$(AR_$(1)) s" \
295+
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) -fno-stack-protector" \
297296
$(S)src/libbacktrace/configure --target=$(1) --host=$(CFG_BUILD))
298297
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
299298
$$(BACKTRACE_BUILD_DIR_$(1))/config.h

0 commit comments

Comments
 (0)