forked from OSchip/llvm-project
gn build: Unbreak Android cross-compilation.
- D96404 defaulted to libunwind which isn't provided by NDK r21 (or r22), so specify -rtlib=libgcc on non-arm32. - D97993 means that we need to use --gcc-toolchain instead of -B to let the driver find libgcc.
This commit is contained in:
parent
d90270e9e8
commit
eef8b74ef5
|
@ -13,8 +13,11 @@ if (current_os == "android") {
|
|||
target_flags += [
|
||||
"--target=$llvm_current_triple",
|
||||
"--sysroot=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot",
|
||||
"-B$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64",
|
||||
"--gcc-toolchain=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64",
|
||||
]
|
||||
if (current_cpu != "arm") {
|
||||
target_flags += [ "-rtlib=libgcc" ]
|
||||
}
|
||||
target_ldflags += [ "-static-libstdc++" ]
|
||||
if (current_cpu == "arm") {
|
||||
target_flags += [ "-march=armv7-a" ]
|
||||
|
|
Loading…
Reference in New Issue