aboutsummaryrefslogtreecommitdiffstats
path: root/support/android/build-apk/src
diff options
context:
space:
mode:
authorMátyás Mustoha <mmatyas@inf.u-szeged.hu>2016-12-06 14:00:50 +0100
committerMátyás Mustoha <mmatyas@inf.u-szeged.hu>2016-12-09 12:30:46 +0100
commit2b99c3cd043bd309bbdf1f2758c25f424c8b79cb (patch)
tree54787b1607a03e5c392e97a6003694a3660e6823 /support/android/build-apk/src
parentc3c086e521b73d191d5de9239a6748691b0f96a3 (diff)
downloadservo-2b99c3cd043bd309bbdf1f2758c25f424c8b79cb.tar.gz
servo-2b99c3cd043bd309bbdf1f2758c25f424c8b79cb.zip
Add C++ runtime shared object to the Android APK
Diffstat (limited to 'support/android/build-apk/src')
-rw-r--r--support/android/build-apk/src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/support/android/build-apk/src/main.rs b/support/android/build-apk/src/main.rs
index 234a37e9b51..0f2ad0f2e13 100644
--- a/support/android/build-apk/src/main.rs
+++ b/support/android/build-apk/src/main.rs
@@ -17,7 +17,7 @@ fn main() {
let (args, passthrough) = parse_arguments();
// Find all the native shared libraries that exist in the target directory.
- let native_shared_libs = find_native_libs(&args);
+ let mut native_shared_libs = find_native_libs(&args);
// Get the SDK path from the ANDROID_HOME env.
let sdk_path = env::var("ANDROID_HOME").ok().expect("Please set the ANDROID_HOME environment variable");
@@ -32,6 +32,14 @@ fn main() {
.ok()
.expect("Please set the ANDROID_PLATFORM environment variable");
+ // Add the C++ runtime .so
+ {
+ let libcpp_base_path = ndk_path.join("sources").join("cxx-stl").join("llvm-libc++").join("libs");
+ let libcpp_filename = "libc++_shared.so";
+ let libcpp_path = libcpp_base_path.join("armeabi").join(libcpp_filename);
+ native_shared_libs.insert(libcpp_filename.to_string(), libcpp_path);
+ }
+
// Get the standalone NDK path from NDK_STANDALONE env.
// let standalone_path = env::var("NDK_STANDALONE").ok().unwrap_or("/opt/ndk_standalone".to_string());
// let standalone_path = Path::new(&standalone_path);