[PATCH] D113606: [gn build] Fix Android compiler-rt targets
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 10 13:22:41 PST 2021
aeubanks updated this revision to Diff 386299.
aeubanks added a comment.
use pcc's suggestion
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113606/new/
https://reviews.llvm.org/D113606
Files:
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/BUILD.gn
Index: llvm/utils/gn/secondary/compiler-rt/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/BUILD.gn
@@ -12,10 +12,14 @@
supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
}
if (android_ndk_path != "") {
- supported_toolchains += [
- "//llvm/utils/gn/build/toolchain:stage2_android_aarch64",
- "//llvm/utils/gn/build/toolchain:stage2_android_arm",
- ]
+ if (llvm_build_AArch64) {
+ supported_toolchains +=
+ [ "//llvm/utils/gn/build/toolchain:stage2_android_aarch64" ]
+ }
+ if (llvm_build_ARM) {
+ supported_toolchains +=
+ [ "//llvm/utils/gn/build/toolchain:stage2_android_arm" ]
+ }
}
group("compiler-rt") {
deps = [ "//compiler-rt/include($host_toolchain)" ]
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -269,7 +269,8 @@
if (current_os == "win") {
assert(is_clang, "sysroot only works with clang-cl as host compiler")
cflags += [ "/winsysroot" + rebase_path(sysroot, root_build_dir) ]
- } else if (current_os != "ios" && current_os != "mac") {
+ } else if (current_os != "ios" && current_os != "mac" &&
+ current_os != "android") {
cflags += [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113606.386299.patch
Type: text/x-patch
Size: 1469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211110/89fa3ea7/attachment.bin>
More information about the llvm-commits
mailing list