[PATCH] D152591: [gn] Add Mac support to check-asan target
Leonard Grey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 06:59:40 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc24a39b726e9: [gn] Mac support for check-asan target (authored by lgrey).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152591/new/
https://reviews.llvm.org/D152591
Files:
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/target.gni
llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn
Index: llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/test/asan/BUILD.gn
@@ -17,12 +17,16 @@
"ASAN_TEST_BITS=64",
"ASAN_TEST_APPLE_PLATFORM=",
"ASAN_TEST_MIN_DEPLOYMENT_TARGET_FLAG=",
- "ASAN_TEST_DYNAMIC=0",
"ASAN_TEST_TARGET_ARCH=$crt_current_target_arch",
"COMPILER_RT_ARM_THUMB=",
"COMPILER_RT_BINARY_DIR=" + rebase_path("$root_gen_dir/compiler-rt"),
"LIT_SITE_CFG_IN_HEADER=## Autogenerated from $input, do not edit",
]
+ if (host_os == "mac") {
+ values += [ "ASAN_TEST_DYNAMIC=1" ]
+ } else {
+ values += [ "ASAN_TEST_DYNAMIC=0" ]
+ }
}
if (current_toolchain != host_toolchain) {
@@ -34,18 +38,23 @@
"//compiler-rt/lib/asan:ignorelist($host_toolchain)",
"//compiler-rt/lib/profile",
"//compiler-rt/test:lit_common_configured",
+ "//llvm/tools/llvm-nm($host_toolchain)",
+ "//llvm/tools/llvm-objdump($host_toolchain)",
"//llvm/tools/llvm-readobj($host_toolchain)",
+ "//llvm/tools/llvm-size($host_toolchain)",
"//llvm/tools/llvm-symbolizer($host_toolchain)",
+ "//llvm/tools/sancov($host_toolchain)",
"//llvm/utils/FileCheck($host_toolchain)",
"//llvm/utils/count($host_toolchain)",
"//llvm/utils/llvm-lit($host_toolchain)",
"//llvm/utils/not($host_toolchain)",
+ "//llvm/utils/split-file($host_toolchain)",
]
}
}
supported_toolchains = []
-if (host_os == "linux") {
+if (host_os == "linux" || host_os == "mac") {
supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
} else if (host_os == "win") {
supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_win_x64" ]
Index: llvm/utils/gn/secondary/compiler-rt/target.gni
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/target.gni
+++ llvm/utils/gn/secondary/compiler-rt/target.gni
@@ -32,6 +32,7 @@
}
} else if (current_os == "ios" || current_os == "mac") {
crt_current_out_dir = "$clang_resource_dir/lib/darwin"
+ crt_current_target_suffix = "-$crt_current_target_arch"
} else if (current_os == "baremetal") {
crt_current_out_dir = "$clang_resource_dir/lib/baremetal"
crt_current_target_suffix = "-$crt_current_target_arch"
Index: llvm/utils/gn/secondary/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/BUILD.gn
+++ llvm/utils/gn/secondary/BUILD.gn
@@ -22,7 +22,7 @@
"//libcxxabi",
]
}
- if (current_os == "linux" || current_os == "win") {
+ if (current_os == "linux" || current_os == "win" || current_os=="mac") {
deps += [ "//compiler-rt/test/asan" ]
}
if (current_os == "linux" || current_os == "android") {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152591.530496.patch
Type: text/x-patch
Size: 2893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230612/3e0baa1e/attachment.bin>
More information about the llvm-commits
mailing list