[llvm] [libc][bazel] Add copts to libc_support_library (PR #73591)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 15:56:30 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (michaelrj-google)
<details>
<summary>Changes</summary>
Most libc_support_library calls are for header-only libraries, but there
are a few that have .cpp files. This patch adds the same base copts to
these that libc_function already has.
---
Full diff: https://github.com/llvm/llvm-project/pull/73591.diff
1 Files Affected:
- (modified) utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl (+4-2)
``````````diff
diff --git a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
index 0c63bdb96333726..011f944311c281d 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
@@ -47,8 +47,10 @@ def _libc_library(name, hidden, copts = [], deps = [], **kwargs):
# A convenience function which should be used to list all libc support libraries.
# Any library which does not define a public function should be listed with
# libc_support_library.
-def libc_support_library(name, **kwargs):
- _libc_library(name = name, hidden = False, **kwargs)
+def libc_support_library(name, copts = None, **kwargs):
+ copts = copts or []
+ copts = copts + ["-O3", "-fno-builtin", "-fno-lax-vector-conversions"]
+ _libc_library(name = name, copts = copts, hidden = False, **kwargs)
def libc_function(
name,
``````````
</details>
https://github.com/llvm/llvm-project/pull/73591
More information about the llvm-commits
mailing list