Skip to content

Commit 80ad13a

Browse files
authored
[bazel] Fix compiler-rt:interception (llvm#200561)
- Add `-DCOMPILER_RT_BUILD_PROFILE_ROCM=1` - Prune `"lib/sanitizer_common/*.S"`, it means `*.inc.S` - Add `-fvisibility=hidden` Bazel doesn't add `-gline-tables-only` by default. Add flags to CMake side to align the build to Bazel. - `-DCOMPILER_RT_HAS_G_FLAG=OFF` - `-DCOMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG=OFF`
1 parent f15904e commit 80ad13a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • utils/bazel/llvm-project-overlay/compiler-rt

utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ cc_library(
1515
name = "config",
1616
defines = select({
1717
"@platforms//os:linux": [
18+
"COMPILER_RT_BUILD_PROFILE_ROCM=1",
1819
"COMPILER_RT_HAS_ATOMICS=1",
1920
"COMPILER_RT_HAS_FCNTL_LCK=1",
2021
"COMPILER_RT_HAS_UNAME=1",
@@ -46,7 +47,6 @@ cc_library(
4647
srcs = glob(
4748
[
4849
"lib/sanitizer_common/*.cpp",
49-
"lib/sanitizer_common/*.S",
5050
],
5151
),
5252
linkstatic = True,
@@ -60,7 +60,11 @@ cc_library(
6060
name = "interception",
6161
srcs = glob(["lib/interception/*.cpp"]),
6262
hdrs = glob(["lib/interception/*.h"]),
63-
includes = [":lib"],
63+
copts = [
64+
"-fomit-frame-pointer",
65+
"-fvisibility=hidden",
66+
],
67+
includes = ["lib"],
6468
linkstatic = True,
6569
deps = [
6670
":sanitizer_common_headers",

0 commit comments

Comments
 (0)