forked from mirrors/gecko-dev
Bug 1674773 - make tsan builds use consistent flags. r=rstewart
This makes --enable-thread-sanitizer turn on Rust tsan (-Zsanitizer=thread). This requires changing SpiderMonkey tsan to use the tsan rust nightly. In future changes, more Rust tsan integration will key off of MOZ_TSAN. Differential Revision: https://phabricator.services.mozilla.com/D96453
This commit is contained in:
parent
e5a523648c
commit
d1d354bb8f
3 changed files with 6 additions and 4 deletions
|
|
@ -18,9 +18,6 @@ export MOZ_PKG_SPECIAL=tsan
|
||||||
# Disable telemetry
|
# Disable telemetry
|
||||||
ac_add_options MOZ_TELEMETRY_REPORTING=
|
ac_add_options MOZ_TELEMETRY_REPORTING=
|
||||||
|
|
||||||
# Ensure Rust also gets the necessary instrumentation
|
|
||||||
export RUSTFLAGS="-Zsanitizer=thread"
|
|
||||||
|
|
||||||
# rustfmt is currently missing in Rust nightly
|
# rustfmt is currently missing in Rust nightly
|
||||||
unset RUSTFMT
|
unset RUSTFMT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,11 @@ ifeq (1,$(MOZ_PARALLEL_BUILD))
|
||||||
cargo_build_flags += -j1
|
cargo_build_flags += -j1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# This should also be paired with -Zbuild-std, but that doesn't work yet.
|
||||||
|
ifdef MOZ_TSAN
|
||||||
|
RUSTFLAGS += -Zsanitizer=thread
|
||||||
|
endif
|
||||||
|
|
||||||
# These flags are passed via `cargo rustc` and only apply to the final rustc
|
# These flags are passed via `cargo rustc` and only apply to the final rustc
|
||||||
# invocation (i.e., only the top-level crate, not its dependencies).
|
# invocation (i.e., only the top-level crate, not its dependencies).
|
||||||
cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
|
cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ sm-tsan-linux64/opt:
|
||||||
toolchain:
|
toolchain:
|
||||||
- linux64-binutils
|
- linux64-binutils
|
||||||
- linux64-clang
|
- linux64-clang
|
||||||
- linux64-rust
|
- linux64-rust-nightly
|
||||||
- linux64-dump-syms
|
- linux64-dump-syms
|
||||||
|
|
||||||
sm-rootanalysis-linux64/debug:
|
sm-rootanalysis-linux64/debug:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue