blob: 57f01eadad7a12a83f808e6d504944170892affe [file] [log] [blame]
Brian Silvermanb2215d02015-11-23 19:10:15 -05001# Use our CROSSTOOL.
Brian Silvermanfbe4fd52015-10-26 10:40:55 -04002build --crosstool_top=//tools/cpp:toolchain
Brian Silvermanb2215d02015-11-23 19:10:15 -05003# Don't switch HOST compilers.
4build --host_crosstool_top=//tools/cpp:toolchain
Brian Silvermanfbe4fd52015-10-26 10:40:55 -04005
Brian Silverman5bc54342015-11-26 22:57:46 -05006# Always include debug information in the non-.stripped binaries.
7build --strip=never
8
Brian Silverman516ceb22015-11-27 01:29:05 -05009# Use the malloc we want.
10build --custom_malloc=//tools/cpp:malloc
11
Brian Silverman6470f442018-08-05 12:08:16 -070012# Use our hermetic Python runtime.
13build --python_top=//tools/python:runtime
14
Brian Silverman63889f92015-11-27 01:33:56 -050015build:asan --copt -fsanitize=address
16build:asan --linkopt -fsanitize=address --linkopt -ldl
17build:asan --platform_suffix=-asan
18build:asan --test_env ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.6
19build:asan --test_env ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:detect_odr_violation=2:allow_user_segv_handler=1
Brian Silvermanb466eef2015-11-28 20:33:44 -050020build:asan --copt -fsanitize-blacklist=tools/cpp/asan-blacklist
Brian Silverman7dc6adb2017-02-19 17:04:36 -080021build:asan --define have_asan=true
Brian Silverman63889f92015-11-27 01:33:56 -050022
23build:tsan --copt -fsanitize=thread --copt -DAOS_SANITIZER_thread
24build:tsan --linkopt -fsanitize=thread
25build:tsan --platform_suffix=-tsan
26build:tsan --test_env TSAN_OPTIONS=external_symbolizer_path=/usr/bin/llvm-symbolizer-3.6:detect_deadlocks=1:second_deadlock_stack=1
Brian Silverman7dc6adb2017-02-19 17:04:36 -080027build:tsan --define have_tsan=true
Brian Silverman63889f92015-11-27 01:33:56 -050028
29build:isan --copt -fsanitize=integer
30build:isan --linkopt -fsanitize=integer
31build:isan --platform_suffix=-isan
32build:isan --test_env LLVM_SYMBOLIZER=/usr/bin/llvm-symbolizer-3.6
Brian Silverman7dc6adb2017-02-19 17:04:36 -080033build:isan --define have_isan=true
Brian Silverman63889f92015-11-27 01:33:56 -050034
Brian Silvermana4a4ea62015-11-27 10:27:53 -050035build:ubsan --copt -fsanitize=undefined --copt -fno-sanitize-recover
36# Bad alignment is just slow on x86 and traps on ARM, so we'll find
37# it other ways, and some x86 code does it on purpose.
38build:ubsan --copt -fno-sanitize=alignment
Brian Silverman63889f92015-11-27 01:33:56 -050039build:ubsan --linkopt -fsanitize=undefined
Brian Silvermanb466eef2015-11-28 20:33:44 -050040# TOOD(Brian): Remove this once Clang adds it itself like it should.
41build:ubsan --linkopt /usr/lib/llvm-3.6/lib/clang/3.6.2/lib/linux/libclang_rt.ubsan_cxx-x86_64.a
Brian Silverman63889f92015-11-27 01:33:56 -050042build:ubsan --platform_suffix=-ubsan
Brian Silvermanb466eef2015-11-28 20:33:44 -050043build:ubsan --test_env UBSAN_OPTIONS=external_symbolizer_path=/usr/bin/llvm-symbolizer-3.6:color=always:print_stacktrace=1
44build:ubsan --copt -fsanitize-blacklist=tools/cpp/ubsan-blacklist
Brian Silverman7dc6adb2017-02-19 17:04:36 -080045build:ubsan --define have_ubsan=true
Brian Silverman63889f92015-11-27 01:33:56 -050046
Brian Silvermana4a4ea62015-11-27 10:27:53 -050047build:msan --copt -fsanitize=memory --copt -fsanitize-memory-track-origins
Brian Silvermanb466eef2015-11-28 20:33:44 -050048build:msan --linkopt -fsanitize=memory --linkopt -fsanitize-memory-track-origins
Brian Silverman63889f92015-11-27 01:33:56 -050049build:msan --platform_suffix=-msan
50build:msan --test_env MSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.6
Brian Silverman7dc6adb2017-02-19 17:04:36 -080051build:msan --define have_msan=true
Brian Silverman63889f92015-11-27 01:33:56 -050052
James Kuszmaul2af1ba82019-02-09 22:16:53 -080053# Sometime, we want to be able to have eigen assertions run so that we can
54# catch potential issues (e.g., accessing invalid indices).
55build:eigen --copt -UNDEBUG
56
Brian Silverman12b3fc52015-10-11 19:38:33 -040057# Show paths to a few more than just 1 target.
Austin Schuh00bc0932016-02-14 21:05:34 -080058build --show_result 5
Brian Silverman12b3fc52015-10-11 19:38:33 -040059# Dump the output of the failing test to stdout.
60test --test_output=errors
Brian Silvermanb200c172017-01-02 17:35:35 -080061
Austin Schuh9d92e6b2017-10-17 01:19:38 -070062build --experimental_sandbox_base=/dev/shm/
Austin Schuh35c75e82017-03-11 21:54:05 -080063build --experimental_multi_threaded_digest
Austin Schuh9d92e6b2017-10-17 01:19:38 -070064
65build --sandbox_fake_hostname=true
66build --sandbox_fake_username=true
67
Austin Schuh4f857292018-02-15 23:42:04 -080068build --auto_cpu_environment_group=//tools:cpus
Austin Schuh9d92e6b2017-10-17 01:19:38 -070069startup --host_jvm_args=-Dbazel.DigestFunction=SHA1
70
71common --watchfs
Austin Schuhe18baff2018-10-20 17:40:42 -070072
73# Switch to SHA256 for compatibility with distributed caching.
74startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
75
Austin Schuhb6043b22017-11-29 00:14:39 -080076build --spawn_strategy=linux-sandbox
Austin Schuhe18baff2018-10-20 17:40:42 -070077build --experimental_sandbox_default_allow_network=false
78
79# Use our hermetic JDK.
80# Note that this doesn't quite work fully, but it should. See
81# https://github.com/bazelbuild/bazel/issues/6341 for ongoing discussion with
82# upstream about this.
83build --javabase=@openjdk_linux_archive//:jdk --host_javabase=@openjdk_linux_archive//:jdk
Austin Schuh5e8890f2018-11-26 04:13:15 -080084
85build --noexperimental_separate_genfiles_directory