servo: Merge #17008 - Make armv7-linux-androideabi default target on Android (from MortimerGoro:android_default_armv7); r=larsberg
authorImanol Fernandez <mortimergoro@gmail.com>
Wed, 31 May 2017 16:29:19 -0500
changeset 361679 c0db7825ec5b09c128924ae1f9b1e4186430f512
parent 361678 8905663e76c5d8ed9b17d4c6a679791f3f280d1f
child 361680 44c831aee2d0dc9a96c7a3f792420d9af0998b65
push id31939
push usercbook@mozilla.com
push dateThu, 01 Jun 2017 11:49:28 +0000
treeherdermozilla-central@d96110d76619 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslarsberg
bugs17008, 11921
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17008 - Make armv7-linux-androideabi default target on Android (from MortimerGoro:android_default_armv7); r=larsberg <!-- Please describe your changes on the following line: --> See https://github.com/servo/servo/issues/11921 After fixing problematic dependencies this is the last step to support armv7-linux-androideabi target on Android: - Updates skia dependency to fix a linker error. See https://github.com/servo/skia/pull/136 - Fixes specifying android targets on `./mach package` and `./mach install` steps: -`./mach package --release --target=arm-linux-androideabi` -`./mach package --release --target=armv7-linux-androideabi` -`./mach package --release --target=aarch64-linux-android` - Make `armv7-linux-androideabi`default when `--android` param is used in build, package or install commands --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11921 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a694f70acf2f011da816a24716d6501ab153c64e
servo/Cargo.lock
servo/etc/ci/check_dynamic_symbols.py
servo/python/servo/command_base.py
servo/python/servo/package_commands.py
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -107,17 +107,17 @@ dependencies = [
  "core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.30000004.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.30000004.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "backtrace"
 version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -2590,17 +2590,17 @@ dependencies = [
  "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.30000004.1"
+version = "0.30000004.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3625,17 +3625,17 @@ dependencies = [
 "checksum serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc888bd283bd2420b16ad0d860e35ad8acb21941180a83a189bb2046f9d00400"
 "checksum serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "978fd866f4d4872084a81ccc35e275158351d3b9fe620074e7d7504b816b74ba"
 "checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1"
 "checksum servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21069a884c33fe6ee596975e1f3849ed88c4ec857fbaf11d33672d8ebe051217"
 "checksum servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "93f799b649b4a2bf362398910eca35240704c7e765e780349b2bb1070d892262"
 "checksum servo-fontconfig-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6be80777ee6edecbbbf8774c76e19dddfe336256c57a4ded06d6ad3df7be358e"
 "checksum servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b"
 "checksum servo-glutin 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8398095f9b3dc3c6d706d395e192624be1f1bcc6f366b009fe17a20cb5dd3d72"
-"checksum servo-skia 0.30000004.1 (registry+https://github.com/rust-lang/crates.io-index)" = "22ba980da523e91b9d2f7da9fb35f721138a1e604b8d8191e56f403e4760a9e4"
+"checksum servo-skia 0.30000004.3 (registry+https://github.com/rust-lang/crates.io-index)" = "109e567850bad212ee98ed9651e256de862bd9764476f2b16355af5f6ef59cfe"
 "checksum servo-websocket 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a1ff13c5d852c2793805226e688044309f2c1d8f063784805a13e99cb75b611"
 "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c"
 "checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a"
 "checksum shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72f20b8f3c060374edb8046591ba28f62448c369ccbdc7b02075103fb3a9e38d"
 "checksum sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6649e43c1a1e68d29ed56d0dc3b5b6cf3b901da77cf107c4066b9e3da036df5"
 "checksum signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)" = "<none>"
 "checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
 "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
--- a/servo/etc/ci/check_dynamic_symbols.py
+++ b/servo/etc/ci/check_dynamic_symbols.py
@@ -18,17 +18,17 @@ symbol_regex = re.compile(b"D  \*UND\*\t
 allowed_symbols = frozenset([b'unshare', b'malloc_usable_size', b'__cxa_type_match'])
 actual_symbols = set()
 
 objdump_output = subprocess.check_output([
     os.path.join(
         os.environ['ANDROID_NDK'], 'toolchains', 'arm-linux-androideabi-4.9',
         'prebuilt', 'linux-x86_64', 'bin', 'arm-linux-androideabi-objdump'),
     '-T',
-    'target/arm-linux-androideabi/debug/libservo.so']
+    'target/armv7-linux-androideabi/debug/libservo.so']
 ).split(b'\n')
 
 for line in objdump_output:
     m = symbol_regex.search(line)
     if m is not None:
         actual_symbols.add(m.group(2))
 
 difference = actual_symbols - allowed_symbols
--- a/servo/python/servo/command_base.py
+++ b/servo/python/servo/command_base.py
@@ -272,17 +272,18 @@ class CommandBase(object):
         self.config["build"].setdefault("ccache", "")
         self.config["build"].setdefault("rustflags", "")
         self.config["build"].setdefault("incremental", False)
 
         self.config.setdefault("android", {})
         self.config["android"].setdefault("sdk", "")
         self.config["android"].setdefault("ndk", "")
         self.config["android"].setdefault("toolchain", "")
-        self.handle_android_target("arm-linux-androideabi")
+        # Set default android target
+        self.handle_android_target("armv7-linux-androideabi")
 
         self.set_cargo_root()
         self.set_use_stable_rust(False)
 
     _use_stable_rust = False
     _rust_version = None
     _rust_version_is_stable = False
     _cargo_build_id = None
--- a/servo/python/servo/package_commands.py
+++ b/servo/python/servo/package_commands.py
@@ -170,20 +170,28 @@ class PackageCommands(CommandBase):
     @CommandArgument('--release', '-r', action='store_true',
                      help='Package the release build')
     @CommandArgument('--dev', '-d', action='store_true',
                      help='Package the dev build')
     @CommandArgument('--android',
                      default=None,
                      action='store_true',
                      help='Package Android')
-    def package(self, release=False, dev=False, android=None, debug=False, debugger=None):
+    @CommandArgument('--target', '-t',
+                     default=None,
+                     help='Package for given target platform')
+    def package(self, release=False, dev=False, android=None, debug=False, debugger=None, target=None):
         env = self.build_env()
         if android is None:
             android = self.config["build"]["android"]
+        if target and android:
+            print("Please specify either --target or --android.")
+            sys.exit(1)
+        if not android:
+            android = self.handle_android_target(target)
         binary_path = self.get_binary_path(release, dev, android=android)
         dir_to_root = self.get_top_dir()
         target_dir = path.dirname(binary_path)
         if android:
             android_target = self.config["android"]["target"]
             if "aarch64" in android_target:
                 build_type = "Arm64"
             elif "armv7" in android_target:
@@ -379,17 +387,25 @@ class PackageCommands(CommandBase):
              category='package')
     @CommandArgument('--release', '-r', action='store_true',
                      help='Install the release build')
     @CommandArgument('--dev', '-d', action='store_true',
                      help='Install the dev build')
     @CommandArgument('--android',
                      action='store_true',
                      help='Install on Android')
-    def install(self, release=False, dev=False, android=False):
+    @CommandArgument('--target', '-t',
+                     default=None,
+                     help='Install the given target platform')
+    def install(self, release=False, dev=False, android=False, target=None):
+        if target and android:
+            print("Please specify either --target or --android.")
+            sys.exit(1)
+        if not android:
+            android = self.handle_android_target(target)
         try:
             binary_path = self.get_binary_path(release, dev, android=android)
         except BuildNotFound:
             print("Servo build not found. Building servo...")
             result = Registrar.dispatch(
                 "build", context=self.context, release=release, dev=dev, android=android
             )
             if result: