[llvm] 72cac51 - gn build: Do not build libunwind.so for Android.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 20:53:45 PDT 2022
Author: Peter Collingbourne
Date: 2022-10-06T20:53:15-07:00
New Revision: 72cac51779d68080ac6b2b1e4afc052081349709
URL: https://github.com/llvm/llvm-project/commit/72cac51779d68080ac6b2b1e4afc052081349709
DIFF: https://github.com/llvm/llvm-project/commit/72cac51779d68080ac6b2b1e4afc052081349709.diff
LOG: gn build: Do not build libunwind.so for Android.
Android does not use a shared libunwind.so and its presence in the build
directory can be harmful, for example it can end up being dynamically
linked against while not being present on the device.
Added:
Modified:
llvm/utils/gn/secondary/libunwind/src/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/libunwind/src/BUILD.gn b/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
index 6605e4386d28..d5e15f220cc9 100644
--- a/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
@@ -74,7 +74,7 @@ config("unwind_config") {
}
}
-if (libunwind_enable_shared) {
+if (libunwind_enable_shared && target_os != "android") {
shared_library("unwind_shared") {
output_dir = unwind_output_dir
output_name = "unwind"
@@ -138,7 +138,7 @@ if (libunwind_enable_static) {
group("src") {
deps = []
- if (libunwind_enable_shared) {
+ if (libunwind_enable_shared && target_os != "android") {
deps += [ ":unwind_shared" ]
}
if (libunwind_enable_static) {
More information about the llvm-commits
mailing list