Get the magicleap build to work in CI

This commit is contained in:
Alan Jeffrey 2018-11-08 13:59:47 -06:00
parent ed0e6e1bb2
commit 08270f07fc
7 changed files with 15 additions and 22 deletions

4
Cargo.lock generated
View file

@ -230,7 +230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "blurmac" name = "blurmac"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/devices#967e13521ac9825a6664f1ed3fb2d2025cac0371" source = "git+https://github.com/servo/devices#cb28c4725ffbfece99dab842d17d3e8c50774778"
dependencies = [ dependencies = [
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"objc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -820,7 +820,7 @@ dependencies = [
[[package]] [[package]]
name = "device" name = "device"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/devices#967e13521ac9825a6664f1ed3fb2d2025cac0371" source = "git+https://github.com/servo/devices#cb28c4725ffbfece99dab842d17d3e8c50774778"
dependencies = [ dependencies = [
"blurdroid 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "blurdroid 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"blurmac 0.1.0 (git+https://github.com/servo/devices)", "blurmac 0.1.0 (git+https://github.com/servo/devices)",

View file

@ -13,6 +13,7 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "1.0" bitflags = "1.0"
bluetooth_traits = {path = "../bluetooth_traits"} bluetooth_traits = {path = "../bluetooth_traits"}
device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}
embedder_traits = {path = "../embedder_traits"} embedder_traits = {path = "../embedder_traits"}
ipc-channel = "0.11" ipc-channel = "0.11"
log = "0.4" log = "0.4"
@ -21,10 +22,4 @@ servo_rand = {path = "../rand"}
uuid = {version = "0.7", features = ["v4"]} uuid = {version = "0.7", features = ["v4"]}
[features] [features]
disable-native-bluetooth = [] native-bluetooth = ["device/bluetooth"]
[target.'cfg(feature = "disable-native-bluetooth")'.dependencies]
device = {git = "https://github.com/servo/devices", default-features = false, features = ["bluetooth-test"]}
[target.'cfg(not(feature = "disable-native-bluetooth"))'.dependencies]
device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}

View file

@ -19,7 +19,7 @@ energy-profiling = ["profile_traits/energy-profiling"]
debugmozjs = ["script/debugmozjs"] debugmozjs = ["script/debugmozjs"]
googlevr = ["webvr/googlevr"] googlevr = ["webvr/googlevr"]
js_backtrace = ["script/js_backtrace"] js_backtrace = ["script/js_backtrace"]
disable-native-bluetooth = ["bluetooth/disable-native-bluetooth"] native-bluetooth = ["bluetooth/native-bluetooth"]
webrender_debugger = ["webrender/debugger"] webrender_debugger = ["webrender/debugger"]
oculusvr = ["webvr/oculusvr"] oculusvr = ["webvr/oculusvr"]
unstable = [ unstable = [

View file

@ -2,18 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate egl;
#[macro_use]
extern crate log;
extern crate servo;
extern crate smallvec;
use egl::egl::EGLContext; use egl::egl::EGLContext;
use egl::egl::EGLDisplay; use egl::egl::EGLDisplay;
use egl::egl::EGLSurface; use egl::egl::EGLSurface;
use egl::egl::MakeCurrent; use egl::egl::MakeCurrent;
use egl::egl::SwapBuffers; use egl::egl::SwapBuffers;
use egl::eglext::eglGetProcAddress; use egl::eglext::eglGetProcAddress;
use log::info;
use log::warn;
use servo::compositing::windowing::AnimationState; use servo::compositing::windowing::AnimationState;
use servo::compositing::windowing::EmbedderCoordinates; use servo::compositing::windowing::EmbedderCoordinates;
use servo::compositing::windowing::MouseWindowEvent; use servo::compositing::windowing::MouseWindowEvent;
@ -483,7 +479,7 @@ impl log::Log for MLLogger {
log::Level::Debug => MLLogLevel::Debug, log::Level::Debug => MLLogLevel::Debug,
log::Level::Trace => MLLogLevel::Verbose, log::Level::Trace => MLLogLevel::Verbose,
}; };
let mut msg = SmallVec::<[c_char; 128]>::new(); let mut msg = SmallVec::<[u8; 128]>::new();
write!(msg, "{}\0", record.args()); write!(msg, "{}\0", record.args());
(self.0)(lvl, &msg[0] as *const _ as *const _); (self.0)(lvl, &msg[0] as *const _ as *const _);
} }

View file

@ -43,5 +43,6 @@ debugmozjs = ["libservo/debugmozjs"]
unstable = ["libservo/unstable"] unstable = ["libservo/unstable"]
googlevr = ["libservo/googlevr"] googlevr = ["libservo/googlevr"]
oculusvr = ["libservo/oculusvr"] oculusvr = ["libservo/oculusvr"]
native-bluetooth = ["libservo/native-bluetooth"]
webgl_backtrace = ["libservo/webgl_backtrace"] webgl_backtrace = ["libservo/webgl_backtrace"]
js_backtrace = ["libservo/js_backtrace"] js_backtrace = ["libservo/js_backtrace"]

View file

@ -29,7 +29,7 @@ ProductName = "Servo"
[features] [features]
default = ["unstable", "default-except-unstable"] default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"] default-except-unstable = ["webdriver", "max_log_level"]
disable-native-bluetooth = ["libservo/disable-native-bluetooth"] native-bluetooth = ["libservo/native-bluetooth"]
max_log_level = ["log/release_max_level_info"] max_log_level = ["log/release_max_level_info"]
webdriver = ["libservo/webdriver"] webdriver = ["libservo/webdriver"]
energy-profiling = ["libservo/energy-profiling"] energy-profiling = ["libservo/energy-profiling"]

View file

@ -248,10 +248,11 @@ class MachCommands(CommandBase):
if android: if android:
target = self.config["android"]["target"] target = self.config["android"]["target"]
if magicleap: if not magicleap:
features += ["disable-native-bluetooth"] features += ["native-bluetooth"]
if not target:
target = "aarch64-linux-android" if magicleap and not target:
target = "aarch64-linux-android"
if target: if target:
if self.config["tools"]["use-rustup"]: if self.config["tools"]["use-rustup"]: