diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-05-08 16:04:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 16:04:26 -0400 |
commit | c3a79e871130abfd19905cd595dd4ccedab63316 (patch) | |
tree | 574f8fe0bd51c3a8e53334530ddc87941b5e295c | |
parent | ea71b3522061c48256ab1c5a27fb2db8f2607e0e (diff) | |
parent | a54080749315ba8772db01c3f8b6263349d4aec4 (diff) | |
download | servo-c3a79e871130abfd19905cd595dd4ccedab63316.tar.gz servo-c3a79e871130abfd19905cd595dd4ccedab63316.zip |
Auto merge of #23318 - asajeffrey:magicleap-debugmozjs, r=jdm
Fix magicleap debugmozjs
<!-- Please describe your changes on the following line: -->
These changes get magicleap servo to compile with `--debugmozjs`.
---
<!-- 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 #23074 and fix #22069
- [X] These changes do not require tests because we're not building debugmozjs servo for magicleap
<!-- 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. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23318)
<!-- Reviewable:end -->
-rw-r--r-- | Cargo.lock | 6 | ||||
-rw-r--r-- | components/script/script_runtime.rs | 4 | ||||
-rw-r--r-- | python/servo/build_commands.py | 6 | ||||
-rw-r--r-- | support/magicleap/Servo2D/Servo2D.mabu | 4 | ||||
-rwxr-xr-x | support/magicleap/fake-ld.sh | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/Cargo.lock b/Cargo.lock index a60b58e1abe..3d5ffe2c4af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2808,13 +2808,13 @@ dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mozjs_sys 0.61.12 (registry+https://github.com/rust-lang/crates.io-index)", + "mozjs_sys 0.61.13 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mozjs_sys" -version = "0.61.12" +version = "0.61.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5591,7 +5591,7 @@ dependencies = [ "checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f" "checksum mozangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "45a8a18a41cfab0fde25cc2f43ea89064d211a0fbb33225b8ff93ab20406e0e7" "checksum mozjs 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "622108d35f4fdd68b3aa39bfe9bedaee5fa9efd19711d046e1d56ff607c0a36f" -"checksum mozjs_sys 0.61.12 (registry+https://github.com/rust-lang/crates.io-index)" = "370887111c83436555cde840bb2639c5a088c77f01b152957d99e1f279397f48" +"checksum mozjs_sys 0.61.13 (registry+https://github.com/rust-lang/crates.io-index)" = "c7d35502544cf3e70b305e028c6ca9e4c3d5a48264af220f8341598f54d189ba" "checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" "checksum muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "451a9a05d2a32c566c897835e0ea95cf79ed2fdfe957924045a1721a36c9980f" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 6cad5d4238e..80fe9cf31e5 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -685,11 +685,11 @@ unsafe fn set_gc_zeal_options(cx: *mut JSContext) { use js::jsapi::{JS_SetGCZeal, JS_DEFAULT_ZEAL_FREQ}; let level = match pref!(js.mem.gc.zeal.level) { - Some(level @ 0...14) => level as u8, + level @ 0...14 => level as u8, _ => return, }; let frequency = match pref!(js.mem.gc.zeal.frequency) { - Some(frequency) if frequency >= 0 => frequency as u32, + frequency if frequency >= 0 => frequency as u32, _ => JS_DEFAULT_ZEAL_FREQ, }; JS_SetGCZeal(cx, level, frequency); diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c40890ff579..674c06245fb 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -212,11 +212,6 @@ class MachCommands(CommandBase): print("Please specify either --target or --android.") sys.exit(1) - # https://github.com/servo/servo/issues/22069 - if debug_mozjs and magicleap: - print("Please specify either --debug-mozjs or --magicleap.") - sys.exit(1) - if android: target = self.config["android"]["target"] @@ -576,6 +571,7 @@ class MachCommands(CommandBase): env.setdefault("HARFBUZZ_SYS_NO_PKG_CONFIG", "1") env.setdefault("PKG_CONFIG_ALLOW_CROSS", "1") env.setdefault("CMAKE_TOOLCHAIN_FILE", path.join(ml_support, "toolchain.cmake")) + env.setdefault("_LIBCPP_INLINE_VISIBILITY", "__attribute__((__always_inline__))") # The Open SSL configuration env.setdefault("OPENSSL_DIR", path.join(target_path, target, "native", "openssl")) diff --git a/support/magicleap/Servo2D/Servo2D.mabu b/support/magicleap/Servo2D/Servo2D.mabu index 60404f038ea..43d6fe26b3f 100644 --- a/support/magicleap/Servo2D/Servo2D.mabu +++ b/support/magicleap/Servo2D/Servo2D.mabu @@ -14,10 +14,14 @@ LIBPATHS.debug = \ LIBPATHS.release = \ ../../../target/magicleap/aarch64-linux-android/release +LDFLAGS.device = \ + -L$(MLSDK)/lumin/stl/libc++/lib + STLIBS = \ mlservo SHLIBS = \ + c++abi \ log \ z diff --git a/support/magicleap/fake-ld.sh b/support/magicleap/fake-ld.sh index 9e6f7ca7132..634f1c324bf 100755 --- a/support/magicleap/fake-ld.sh +++ b/support/magicleap/fake-ld.sh @@ -11,7 +11,7 @@ set -o pipefail MAGICLEAP_TOOLCHAIN=${MAGICLEAP_TOOLCHAIN:-"${MAGICLEAP_SDK}/tools/toolchains"} TARGET=${TARGET:-"aarch64-linux-android"} LD=${LD:-"${MAGICLEAP_TOOLCHAIN}/bin/${TARGET}-ld"} -LDFLAGS=${LDFLAGS:-"-L${MAGICLEAP_SDK}/lumin/stl/libc++/lib -L${MAGICLEAP_SDK}/lumin/usr/lib -L${MAGICLEAP_TOOLCHAIN}/lib/gcc/${TARGET}/4.9.x ${MAGICLEAP_SDK}/lumin/usr/lib/crtbegin_so.o"} +LDFLAGS=${LDFLAGS:-"-L${MAGICLEAP_SDK}/lumin/stl/libc++/lib -L${MAGICLEAP_SDK}/lumin/usr/lib -L${MAGICLEAP_TOOLCHAIN}/lib/gcc/${TARGET}/4.9.x"} # Remove the -landroid flag, grr ARGS=("$@") |