]> git.lizzy.rs Git - rust.git/commitdiff
add `--enable-debuginfo-tests`, analogous to `--disable-optimize-tests`.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 29 Apr 2015 15:18:44 +0000 (17:18 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 29 Apr 2015 15:18:44 +0000 (17:18 +0200)
Then, decouple the question of whether the compiler/stdlib carry
debuginfo (which is controlled via `--enable-debuginfo` and implied by
`--enable-debug`) from the question of whether the tests carry
debuginfo (which now no longer is implied by `--enable-debug` nor
`--enable-debuginfo`, and is off by default).

configure
mk/tests.mk

index f4e1d41276aa959cfd98e94f64a24ef0bc8c34db..dbca73415fec62d11ef151ff41d2592d19d981a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -551,6 +551,7 @@ opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
 opt docs     1 "build standard library documentation"
 opt compiler-docs     0 "build compiler documentation"
 opt optimize-tests 1 "build tests with optimizations"
+opt debuginfo-tests 0 "build tests with debugger metadata"
 opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang"
 opt llvm-assertions 0 "build LLVM with assertions"
 opt debug-assertions 0 "build with debugging assertions"
index 3c4818f65dade1a6335d57105f2456bec484793f..f391d8555fc2bff578a2a6c329b79cf71aa84542 100644 (file)
@@ -632,6 +632,13 @@ ifndef CFG_DISABLE_OPTIMIZE_TESTS
 CTEST_RUSTC_FLAGS += -O
 endif
 
+# Analogously to the above, whether to pass `-g` when compiling tests
+# is a separate choice from whether to pass `-g` when building the
+# compiler and standard library themselves.
+CTEST_RUSTC_FLAGS := $$(subst -g,,$$(CTEST_RUSTC_FLAGS))
+ifdef CFG_ENABLE_DEBUGINFO_TESTS
+CTEST_RUSTC_FLAGS += -g
+endif
 
 CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
                --compile-lib-path $$(HLIB$(1)_H_$(3)) \