-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gn build: Support cross-compiling libunwind for Android.
- Usual cross-compilation fix: s/target_/current_/g - Define _LIBUNWIND_IS_NATIVE_ONLY to enable unwinding past functions with return pointer authentication. - Android needs two libunwind static libraries: one with symbols exported and one without. These both need to be in the same build tree so the libunwind_hermetic_static_library configuration option doesn't help here. Replace it with build rules that build both libraries. - Install the libraries in the location that Android expects them to be. Differential Revision: https://reviews.llvm.org/D96563
- Loading branch information
Showing
2 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
import("//llvm/utils/gn/build/toolchain/compiler.gni") | ||
|
||
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", | ||
] | ||
} | ||
|
||
group("libunwind") { | ||
deps = [ "//libunwind/src(//llvm/utils/gn/build/toolchain:stage2_unix)" ] | ||
deps = [] | ||
foreach(toolchain, supported_toolchains) { | ||
deps += [ "//libunwind/src($toolchain)" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters