diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-10-16 05:52:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 05:52:09 -0500 |
commit | a5100e3c783f140c368da89e25e50581dce91bfd (patch) | |
tree | 3a401969c1d35629077dc0a5492c8b0576359b45 | |
parent | 1e351ef8c478de507c6ee7b65eeff7524d73a4c9 (diff) | |
parent | 06f64c196feef524a62462250f54782db005acef (diff) | |
download | servo-a5100e3c783f140c368da89e25e50581dce91bfd.tar.gz servo-a5100e3c783f140c368da89e25e50581dce91bfd.zip |
Auto merge of #18892 - servo:link-args, r=nox
CEF: use `cargo rustc -C link-args=…` instead of `#[link_args="…"]`
The latter is an unstable feature that might be changed or removed.
<!-- 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/18892)
<!-- Reviewable:end -->
-rw-r--r-- | ports/cef/lib.rs | 5 | ||||
-rw-r--r-- | python/servo/build_commands.py | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/ports/cef/lib.rs b/ports/cef/lib.rs index ce73994b326..269d106d167 100644 --- a/ports/cef/lib.rs +++ b/ports/cef/lib.rs @@ -4,7 +4,6 @@ #![allow(non_camel_case_types)] #![feature(core_intrinsics)] -#![feature(link_args)] #[macro_use] extern crate log; @@ -28,10 +27,6 @@ extern crate webrender_api; extern crate libc; #[cfg(target_os="macos")] -#[link_args="-Xlinker -undefined -Xlinker dynamic_lookup"] -extern { } - -#[cfg(target_os="macos")] extern crate cocoa; #[cfg(target_os="macos")] #[macro_use] diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 0d0dbc0ebcd..ec20f18af5a 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -24,7 +24,7 @@ from mach.decorators import ( Command, ) -from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX +from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX, is_macosx from servo.util import host_triple @@ -401,8 +401,14 @@ class MachCommands(CommandBase): if with_debug_assertions: env["RUSTFLAGS"] = "-C debug_assertions" + if is_macosx(): + # Unlike RUSTFLAGS, these are only passed in the final rustc invocation + # so that `./mach build` followed by `./mach build-cef` both build + # common dependencies with the same flags. + opts += ["--", "-C", "link-args=-Xlinker -undefined -Xlinker dynamic_lookup"] + with cd(path.join("ports", "cef")): - ret = call(["cargo", "build"] + opts, + ret = call(["cargo", "rustc"] + opts, env=env, verbose=verbose) elapsed = time() - build_start |