Commit 96287552 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Turn on use_prebuilt_instrumented_libraries by default if is_msan is set.

We only use prebuilt instrumented libraries with msan, so use the right
default for that, and asser that it's not used in any other build configs.

Bug: 1002971
Change-Id: I23c8099394af711a9e28027f9c3093f9f6fd18b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797468
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarEvgenii Stepanov <eugenis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695889}
parent 4a82dff2
...@@ -47,11 +47,6 @@ declare_args() { ...@@ -47,11 +47,6 @@ declare_args() {
# chain of stores leading from allocation site to use site. # chain of stores leading from allocation site to use site.
msan_track_origins = 2 msan_track_origins = 2
# Use dynamic libraries instrumented by one of the sanitizers instead of the
# standard system libraries. Set this flag to download prebuilt binaries from
# GCS.
use_prebuilt_instrumented_libraries = false
# Use dynamic libraries instrumented by one of the sanitizers instead of the # Use dynamic libraries instrumented by one of the sanitizers instead of the
# standard system libraries. Set this flag to build the libraries from source. # standard system libraries. Set this flag to build the libraries from source.
use_locally_built_instrumented_libraries = false use_locally_built_instrumented_libraries = false
...@@ -122,6 +117,15 @@ declare_args() { ...@@ -122,6 +117,15 @@ declare_args() {
archive_seed_corpus = true archive_seed_corpus = true
} }
declare_args() {
# Use dynamic libraries instrumented by one of the sanitizers instead of the
# standard system libraries. Set this flag to download prebuilt binaries from
# GCS.
# TODO(thakis): Stop setting this in bot configs, then stop making this
# an arg. It should be set exactly when is_msan is on.
use_prebuilt_instrumented_libraries = is_msan
}
# Disable sanitizers for non-default toolchains. # Disable sanitizers for non-default toolchains.
if (current_toolchain != default_toolchain) { if (current_toolchain != default_toolchain) {
is_asan = false is_asan = false
...@@ -147,6 +151,9 @@ if (current_toolchain != default_toolchain) { ...@@ -147,6 +151,9 @@ if (current_toolchain != default_toolchain) {
use_sanitizer_coverage = false use_sanitizer_coverage = false
} }
assert(is_msan == use_prebuilt_instrumented_libraries,
"msan requires using instrumented libraries, but nothing else does")
# Whether we are doing a fuzzer build. Normally this should be checked instead # Whether we are doing a fuzzer build. Normally this should be checked instead
# of checking "use_libfuzzer || use_afl" because often developers forget to # of checking "use_libfuzzer || use_afl" because often developers forget to
# check for "use_afl". # check for "use_afl".
...@@ -194,9 +201,6 @@ if (use_libfuzzer && is_linux) { ...@@ -194,9 +201,6 @@ if (use_libfuzzer && is_linux) {
# relies on LEAK_SANITIZER define to avoid false positives. # relies on LEAK_SANITIZER define to avoid false positives.
is_lsan = true is_lsan = true
} }
if (is_msan) {
use_prebuilt_instrumented_libraries = true
}
} }
# MSan only links Chrome properly in release builds (brettw -- 9/1/2015). The # MSan only links Chrome properly in release builds (brettw -- 9/1/2015). The
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment