Skip to content

Commit fa25a75

Browse files
committed
Address comments.
1 parent 7a1a3c5 commit fa25a75

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

libc/src/__support/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define LLVM_LIBC_EMPTY
3333

3434
#define GET_SECOND(first, second, ...) second
35-
#define EXPAND_THEN_SECOND(name) GET_SECOND(name, LLVM_LIBC_EMPTY, )
35+
#define EXPAND_THEN_SECOND(name) GET_SECOND(name, LLVM_LIBC_EMPTY)
3636

3737
#define LLVM_LIBC_ATTR(name) EXPAND_THEN_SECOND(LLVM_LIBC_FUNCTION_ATTR_##name)
3838

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,13 @@ def libc_function(
114114

115115
# This second target is the llvm libc C function with either a default or hidden visibility.
116116
# All other functions are hidden.
117-
global_func_attrs = [
118-
"[[gnu::visibility(\"default\")]]",
119-
]
120117
func_attrs = [
121-
"LLVM_LIBC_FUNCTION_ATTR_" + name + "=\"LLVM_LIBC_EMPTY, [[gnu::weak]]\"",
118+
"LLVM_LIBC_FUNCTION_ATTR_" + name + "='LLVM_LIBC_EMPTY, [[gnu::weak]]'",
122119
] if weak else []
123120

124121
local_defines = (local_defines
125122
+ ["LIBC_COPT_PUBLIC_PACKAGING"]
126-
+ ["LLVM_LIBC_FUNCTION_ATTR='%s'" % " ".join(global_func_attrs)]
123+
+ ["LLVM_LIBC_FUNCTION_ATTR='[[gnu::visibility(\"default\")]]'"]
127124
+ func_attrs)
128125
_libc_library(
129126
name = name,

0 commit comments

Comments
 (0)