diff options
author | Dan Albert <danalbert@google.com> | 2018-02-05 12:32:18 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-02-05 13:21:04 -0800 |
commit | 7fe7e8ecfa6e38498b6e3edcac9bd6c145357765 (patch) | |
tree | 372e9bef16007d83d589de70a1b3978f8df216ad | |
parent | b551c5cddb5621c83a991a6a35eab35131276d12 (diff) | |
download | ndk-7fe7e8ecfa6e38498b6e3edcac9bd6c145357765.tar.gz |
Fix libc++.a linker script for arm32.
Using libc++ on arm32 involves using the LLVM unwinder, which depends
on libdl.
Test: ./run_tests.py --rebuild
Bug: None
Change-Id: I428474c0c13bec87881d08bc1728efd40090fd4a
-rwxr-xr-x | sources/cxx-stl/llvm-libc++/build.py | 2 | ||||
-rw-r--r-- | tests/device/static-executable-exceptions/CMakeLists.txt | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sources/cxx-stl/llvm-libc++/build.py b/sources/cxx-stl/llvm-libc++/build.py index cd60c026d..a9679a02e 100755 --- a/sources/cxx-stl/llvm-libc++/build.py +++ b/sources/cxx-stl/llvm-libc++/build.py @@ -116,7 +116,7 @@ def main(args): # other support libraries appropriately. static_libs = ['-lc++_static', '-lc++abi', '-landroid_support'] if is_arm: - static_libs.extend(['-lunwind', '-latomic']) + static_libs.extend(['-lunwind', '-ldl', '-latomic']) make_linker_script(os.path.join(install_dir, 'libc++.a'), static_libs) shared_libs = ['-landroid_support'] diff --git a/tests/device/static-executable-exceptions/CMakeLists.txt b/tests/device/static-executable-exceptions/CMakeLists.txt new file mode 100644 index 000000000..48c020031 --- /dev/null +++ b/tests/device/static-executable-exceptions/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.6.0) + +add_executable(static-executable jni/main.cpp) + +set_target_properties(static-executable PROPERTIES LINK_FLAGS "-static") |