[PATCH] D146266: gn build: Fix Android build.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 16:42:55 PDT 2023


pcc updated this revision to Diff 505956.
pcc edited the summary of this revision.
pcc added a comment.

Fix commit message


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146266/new/

https://reviews.llvm.org/D146266

Files:
  llvm/utils/gn/build/toolchain/target_flags.gni
  llvm/utils/gn/secondary/compiler-rt/target.gni
  llvm/utils/gn/secondary/libunwind/src/BUILD.gn


Index: llvm/utils/gn/secondary/libunwind/src/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/libunwind/src/BUILD.gn
+++ llvm/utils/gn/secondary/libunwind/src/BUILD.gn
@@ -58,7 +58,7 @@
   } else if (current_cpu == "x64") {
     unwind_output_dir = "$crt_current_out_dir/x86_64"
   } else if (current_cpu == "x86") {
-    unwind_output_dir = "$crt_current_out_dir/i686"
+    unwind_output_dir = "$crt_current_out_dir/i386"
   }
 } else {
   unwind_output_dir = runtimes_dir
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
@@ -2,11 +2,7 @@
 import("//clang/runtimes.gni")
 
 if (current_cpu == "x86") {
-  if (current_os == "android") {
-    crt_current_target_arch = "i686"
-  } else {
-    crt_current_target_arch = "i386"
-  }
+  crt_current_target_arch = "i386"
 } else if (current_cpu == "x64") {
   crt_current_target_arch = "x86_64"
 } else if (current_cpu == "arm") {
Index: llvm/utils/gn/build/toolchain/target_flags.gni
===================================================================
--- llvm/utils/gn/build/toolchain/target_flags.gni
+++ llvm/utils/gn/build/toolchain/target_flags.gni
@@ -15,10 +15,7 @@
     "--sysroot=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot",
     "--gcc-toolchain=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64",
   ]
-  target_ldflags += [
-    "-static-libstdc++",
-    "--unwindlib=none",
-  ]
+  target_ldflags += [ "-static-libstdc++" ]
   if (current_cpu == "arm") {
     target_flags += [ "-march=armv7-a" ]
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146266.505956.patch
Type: text/x-patch
Size: 1719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230316/834065c6/attachment.bin>


More information about the llvm-commits mailing list