From feae7d0b5d141c2cfd7d4ac804edf18ff4a1b80f Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 24 Jul 2014 12:41:13 -0700 Subject: [PATCH 1/4] Add explicit cast from size_t to u64. Fixes compile error on non-64-bit targets. --- src/components/util/memory.rs | 2 +- src/support/stringcache/string-cache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/util/memory.rs b/src/components/util/memory.rs index 7dc98013912..1484b1cfd9f 100644 --- a/src/components/util/memory.rs +++ b/src/components/util/memory.rs @@ -156,7 +156,7 @@ fn get_jemalloc_stat(name: &'static str) -> Option { unsafe { rv = je_mallctl(c_name.unwrap(), oldp, &mut oldlen, mut_null(), 0); } - if rv == 0 { Some(old) } else { None } + if rv == 0 { Some(old as u64) } else { None } } // Like std::macros::try!, but for Option<>. diff --git a/src/support/stringcache/string-cache b/src/support/stringcache/string-cache index 00caade7269..8828119c5d7 160000 --- a/src/support/stringcache/string-cache +++ b/src/support/stringcache/string-cache @@ -1 +1 @@ -Subproject commit 00caade726945dd8a7bbe81d4f8e77c0177d8ee3 +Subproject commit 8828119c5d789452685c82fa71a1dec7f6bd4b0e From 36b1cf4ebaf017a19cc9e33281488302bcfdc9c6 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 24 Jul 2014 12:45:34 -0700 Subject: [PATCH 2/4] Fix compile error and warning on Android --- src/components/main/servo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/main/servo.rs b/src/components/main/servo.rs index 944df69bd43..87f7203ae40 100644 --- a/src/components/main/servo.rs +++ b/src/components/main/servo.rs @@ -53,7 +53,7 @@ use servo_util::opts; use url::{Url, UrlParser}; -#[cfg(not(test), not(target_os="android"))] +#[cfg(not(test))] use std::os; #[cfg(not(test), target_os="android")] use std::str; @@ -83,7 +83,7 @@ pub extern "C" fn android_start(argc: int, argv: **u8) -> int { } } - let mut opts = opts::from_cmdline_args(args.as_slice()); + let opts = opts::from_cmdline_args(args.as_slice()); match opts { Some(mut o) => { // Always use CPU rendering on android. From c3f56476a0afa8ae1435ed1deafce795939f3127 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 24 Jul 2014 14:14:45 -0700 Subject: [PATCH 3/4] Update to latest string-cache. Includes fix for servo/string-cache#4. --- src/support/stringcache/string-cache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/stringcache/string-cache b/src/support/stringcache/string-cache index 8828119c5d7..be58e452719 160000 --- a/src/support/stringcache/string-cache +++ b/src/support/stringcache/string-cache @@ -1 +1 @@ -Subproject commit 8828119c5d789452685c82fa71a1dec7f6bd4b0e +Subproject commit be58e4527196b58cd2f9b19ddf53c8115af676b5 From 16421f03af1fde7405375d8aff321e8abbcdedad Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 24 Jul 2014 14:30:27 -0700 Subject: [PATCH 4/4] Exclude host libs from Android package. Fixes startup error caused by packaging the wrong libphf.so. --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index d5c5e186f10..5b4f2e39ebe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -409,7 +409,7 @@ package: servo else ifeq ($(CFG_OSTYPE),linux-androideabi) package: servo mkdir -p sofile - find . ! \( \( -type d -path './sofile' -o -path './$(CFG_TARGET)/src/compiler/rust' \) -prune \) -name '*.so' -type f | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ + find . ! \( \( -type d -path './sofile' -o -path './$(CFG_TARGET)/src/compiler/rust' -o -path '*/host' \) -prune \) -name '*.so' -type f | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ find $(CFG_RUST_HOME)/lib/rustlib/$(CFG_TARGET)/lib/ -name '*.so' -type f -size +1c | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ cd $(S)src/platform/android/servo-android-glue && make with-libs cd $(CFG_BUILD_HOME)