[PATCH] D127560: gn build: Add support for building the AArch64 LSE builtins.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 13:16:07 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7316b0d54c3d: gn build: Add support for building the AArch64 LSE builtins. (authored by pcc).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127560/new/
https://reviews.llvm.org/D127560
Files:
llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
Index: llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
@@ -6,6 +6,54 @@
compiler_rt_exclude_atomic_builtin = true
}
+lse_targets = []
+
+if (current_cpu == "arm64") {
+ foreach(pat,
+ [
+ "cas",
+ "swp",
+ "ldadd",
+ "ldclr",
+ "ldeor",
+ "ldset",
+ ]) {
+ foreach(size,
+ [
+ "1",
+ "2",
+ "4",
+ "8",
+ "16",
+ ]) {
+ foreach(model,
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ ]) {
+ if (pat == "cas" || size != "16") {
+ source_set("lse_${pat}_${size}_${model}") {
+ # Assign to sources like this to hide from
+ # sync_source_lists_from_cmake.py which won't find the source file
+ # on the CMake side.
+ lse_file = "aarch64/lse.S"
+ sources = [ lse_file ]
+ include_dirs = [ "." ]
+ defines = [
+ "L_$pat",
+ "SIZE=$size",
+ "MODEL=$model",
+ ]
+ }
+ lse_targets += [ ":lse_${pat}_${size}_${model}" ]
+ }
+ }
+ }
+ }
+}
+
static_library("builtins") {
output_dir = crt_current_out_dir
if (current_os == "mac") {
@@ -518,6 +566,8 @@
if (!compiler_rt_exclude_atomic_builtin) {
sources += [ "atomic.c" ]
}
+
+ deps = lse_targets
}
# Currently unused but necessary to make sync_source_lists_from_cmake.py happy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127560.436540.patch
Type: text/x-patch
Size: 1774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/d53fb037/attachment.bin>
More information about the llvm-commits
mailing list