[libc] [llvm] [libc] Allow each function can have extra attributes by defining LLVM_LIBC_FUNCTION_ATTR_func macro. (PR #116160)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 10:10:41 PST 2024
================
@@ -108,16 +108,23 @@ def libc_function(
name = libc_internal_target(name),
srcs = srcs,
copts = copts,
+ local_defines = local_defines,
**kwargs
)
# This second target is the llvm libc C function with either a default or hidden visibility.
# All other functions are hidden.
- func_attrs = ["__attribute__((visibility(\"default\")))"]
- if weak:
- func_attrs = func_attrs + ["__attribute__((weak))"]
- local_defines = local_defines or ["LIBC_COPT_PUBLIC_PACKAGING"]
- local_defines = local_defines + ["LLVM_LIBC_FUNCTION_ATTR='%s'" % " ".join(func_attrs)]
+ global_func_attrs = [
----------------
lntue wrote:
Done.
https://github.com/llvm/llvm-project/pull/116160
More information about the llvm-commits
mailing list