Skip to content

Commit db54ba1

Browse files
fix bazel
1 parent c5ee2f0 commit db54ba1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ def libc_function(
7878
its deps.
7979
**kwargs: Other attributes relevant for a cc_library. For example, deps.
8080
"""
81-
# x86 targets have -mno-omit-leaf-frame-pointer.
82-
copts = selects.with_or({
83-
PLATFORM_CPU_X86_64: ["-mno-omit-leaf-frame-pointer"],
84-
"//conditions:default": []
85-
})
8681
# We use the explicit equals pattern here because append and += mutate the
8782
# original list, where this creates a new list and stores it in deps.
8883
copts = copts + [
@@ -93,6 +88,12 @@ def libc_function(
9388
"-fno-omit-frame-pointer",
9489
"-fstack-protector-strong",
9590
]
91+
# x86 targets have -mno-omit-leaf-frame-pointer.
92+
platform_copts = selects.with_or({
93+
PLATFORM_CPU_X86_64: ["-mno-omit-leaf-frame-pointer"],
94+
"//conditions:default": []
95+
})
96+
copts = copts + platform_copts
9697

9798
# We compile the code twice, the first target is suffixed with ".__internal__" and contains the
9899
# C++ functions in the "LIBC_NAMESPACE" namespace. This allows us to test the function in the

0 commit comments

Comments
 (0)