Skip to content

Commit 7a1a3c5

Browse files
committed
Fix bazel build.
1 parent ed162f5 commit 7a1a3c5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def libc_function(
5959
srcs,
6060
weak = False,
6161
copts = None,
62-
local_defines = None,
62+
local_defines = [],
6363
**kwargs):
6464
"""Add target for a libc function.
6565
@@ -108,16 +108,17 @@ def libc_function(
108108
name = libc_internal_target(name),
109109
srcs = srcs,
110110
copts = copts,
111+
local_defines = local_defines,
111112
**kwargs
112113
)
113114

114115
# This second target is the llvm libc C function with either a default or hidden visibility.
115116
# All other functions are hidden.
116117
global_func_attrs = [
117-
"[[gnu::visibility("default")]]",
118+
"[[gnu::visibility(\"default\")]]",
118119
]
119120
func_attrs = [
120-
"LLVM_LIBC_FUNCTION_ATTR_" + name + "='LLVM_LIBC_EMPTY, [[gnu::weak]]'",
121+
"LLVM_LIBC_FUNCTION_ATTR_" + name + "=\"LLVM_LIBC_EMPTY, [[gnu::weak]]\"",
121122
] if weak else []
122123

123124
local_defines = (local_defines

0 commit comments

Comments
 (0)