| # SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| # Flag to enable remote config |
| common --experimental_repo_remote_exec |
| common --cxxopt=-std=c++17 |
| common --host_cxxopt=-std=c++17 |
| common --copt=-w |
| common --copt=-U_FORTIFY_SOURCE |
| common --copt=-D_FORTIFY_SOURCE=2 |
| |
| # Address sanitizer |
| # bazel build --config asan |
| build:asan --action_env=CC=clang |
| build:asan --action_env=CXX=clang++ |
| build:asan --strip=never |
| build:asan --copt -fsanitize=address |
| build:asan --copt -DADDRESS_SANITIZER |
| build:asan --copt -g |
| build:asan --copt -O1 |
| build:asan --copt -fno-omit-frame-pointer |
| build:asan --copt -fno-sanitize-recover=all |
| build:asan --linkopt -fsanitize=address |
| build:asan --linkopt -shared-libasan |
| |
| # Undefined Behavior Sanitizer |
| # bazel build --config ubsan |
| build:ubsan --action_env=CC=clang |
| build:ubsan --action_env=CXX=clang++ |
| build:ubsan --strip=never |
| build:ubsan --copt -fsanitize=undefined |
| build:ubsan --copt -DUNDEFINED_BEHAVIOR_SANITIZER |
| build:ubsan --copt -g |
| build:ubsan --copt -O1 |
| build:ubsan --copt -fno-omit-frame-pointer |
| build:ubsan --copt -fno-sanitize-recover=all |
| build:ubsan --linkopt -fsanitize=undefined |
| build:ubsan --linkopt -lubsan |