Skip to content

Commit

Permalink
Test -fsanitize=address on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Nov 10, 2022
1 parent 99a8186 commit 3bdb5b0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/shell/bazel/cc_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1752,4 +1752,27 @@ EOF
bazel build //:main --repo_env=CC=clang || fail "Expected compiler flag to have value 'clang'"
}

function test_clang_resource_dir_dependency() {
type -P clang || return 0

cat > BUILD.bazel <<'EOF'
cc_binary(
name = "lib",
srcs = ["lib.cc"],
copts = [
"-fsanitize=address",
],
linkshared = True,
linkstatic = True,
)
EOF
cat > lib.cc <<'EOF'
int lib() {
return 42;
}
EOF

bazel build //:lib --repo_env=CC=clang || fail "Build should succeed"
}

run_suite "cc_integration_test"

0 comments on commit 3bdb5b0

Please sign in to comment.