Skip to content

Commit

Permalink
Get the magicleap build to work in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Nov 9, 2018
1 parent ed0e6e1 commit 08270f0
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions components/bluetooth/Cargo.toml
Expand Up @@ -13,6 +13,7 @@ path = "lib.rs"
[dependencies]
bitflags = "1.0"
bluetooth_traits = {path = "../bluetooth_traits"}
device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}
embedder_traits = {path = "../embedder_traits"}
ipc-channel = "0.11"
log = "0.4"
Expand All @@ -21,10 +22,4 @@ servo_rand = {path = "../rand"}
uuid = {version = "0.7", features = ["v4"]}

[features]
disable-native-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"]}
native-bluetooth = ["device/bluetooth"]
2 changes: 1 addition & 1 deletion components/servo/Cargo.toml
Expand Up @@ -19,7 +19,7 @@ energy-profiling = ["profile_traits/energy-profiling"]
debugmozjs = ["script/debugmozjs"]
googlevr = ["webvr/googlevr"]
js_backtrace = ["script/js_backtrace"]
disable-native-bluetooth = ["bluetooth/disable-native-bluetooth"]
native-bluetooth = ["bluetooth/native-bluetooth"]
webrender_debugger = ["webrender/debugger"]
oculusvr = ["webvr/oculusvr"]
unstable = [
Expand Down
10 changes: 3 additions & 7 deletions ports/libmlservo/src/lib.rs
Expand Up @@ -2,18 +2,14 @@
* 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/. */

extern crate egl;
#[macro_use]
extern crate log;
extern crate servo;
extern crate smallvec;

use egl::egl::EGLContext;
use egl::egl::EGLDisplay;
use egl::egl::EGLSurface;
use egl::egl::MakeCurrent;
use egl::egl::SwapBuffers;
use egl::eglext::eglGetProcAddress;
use log::info;
use log::warn;
use servo::compositing::windowing::AnimationState;
use servo::compositing::windowing::EmbedderCoordinates;
use servo::compositing::windowing::MouseWindowEvent;
Expand Down Expand Up @@ -483,7 +479,7 @@ impl log::Log for MLLogger {
log::Level::Debug => MLLogLevel::Debug,
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());
(self.0)(lvl, &msg[0] as *const _ as *const _);
}
Expand Down
1 change: 1 addition & 0 deletions ports/libsimpleservo/Cargo.toml
Expand Up @@ -43,5 +43,6 @@ debugmozjs = ["libservo/debugmozjs"]
unstable = ["libservo/unstable"]
googlevr = ["libservo/googlevr"]
oculusvr = ["libservo/oculusvr"]
native-bluetooth = ["libservo/native-bluetooth"]
webgl_backtrace = ["libservo/webgl_backtrace"]
js_backtrace = ["libservo/js_backtrace"]
2 changes: 1 addition & 1 deletion ports/servo/Cargo.toml
Expand Up @@ -29,7 +29,7 @@ ProductName = "Servo"
[features]
default = ["unstable", "default-except-unstable"]
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"]
webdriver = ["libservo/webdriver"]
energy-profiling = ["libservo/energy-profiling"]
Expand Down
9 changes: 5 additions & 4 deletions python/servo/build_commands.py
Expand Up @@ -248,10 +248,11 @@ def build(self, target=None, release=False, dev=False, jobs=None,
if android:
target = self.config["android"]["target"]

if magicleap:
features += ["disable-native-bluetooth"]
if not target:
target = "aarch64-linux-android"
if not magicleap:
features += ["native-bluetooth"]

if magicleap and not target:
target = "aarch64-linux-android"

if target:
if self.config["tools"]["use-rustup"]:
Expand Down

0 comments on commit 08270f0

Please sign in to comment.