Skip to content

Commit

Permalink
rustbuild: Update LLVM and enable ThinLTO
Browse files Browse the repository at this point in the history
This commit updates LLVM to fix rust-lang#45511 (https://reviews.llvm.org/D39981) and
also reenables ThinLTO for libtest now that we shouldn't hit rust-lang#45768. This also
opportunistically enables ThinLTO for libstd which was previously blocked
(rust-lang#45661) on test failures related to debuginfo with a presumed cause of rust-lang#45511.

Closes rust-lang#45511
  • Loading branch information
alexcrichton committed Nov 24, 2017
1 parent 85d50ce commit 47498de
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,7 @@ impl<'a> Builder<'a> {
cargo.arg("--release");
}

if mode != Mode::Libstd && // FIXME(#45320)
mode != Mode::Libtest && // FIXME(#45511)
self.config.rust_codegen_units.is_none() &&
if self.config.rust_codegen_units.is_none() &&
self.build.is_rust_llvm(compiler.host)
{
cargo.env("RUSTC_THINLTO", "1");
Expand Down
2 changes: 1 addition & 1 deletion src/libcompiler_builtins
11 changes: 10 additions & 1 deletion src/test/run-make/sanitizer-leak/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
-include ../tools.mk

LOG := $(TMPDIR)/log.txt

# FIXME(#46126) ThinLTO for libstd broke this test
ifeq (1,0)
all:
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
ifdef SANITIZER_SUPPORT
$(RUSTC) -C opt-level=1 -g -Z sanitizer=leak -Z print-link-args leak.rs | grep -q librustc_lsan
$(TMPDIR)/leak 2>&1 | grep -q 'detected memory leaks'
$(TMPDIR)/leak 2>&1 | tee $(LOG)
grep -q 'detected memory leaks' $(LOG)
endif
endif

else
all:
endif

0 comments on commit 47498de

Please sign in to comment.