From f4498dbbb7fcd7acafc942ac4a1185451ccb7cab Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 16 Oct 2017 05:52:09 -0500 Subject: [PATCH] =?UTF-8?q?servo:=20Merge=20#18892=20-=20CEF:=20use=20`car?= =?UTF-8?q?go=20rustc=20-C=20link-args=3D=E2=80=A6`=20instead=20of=20`#[li?= =?UTF-8?q?nk=5Fargs=3D"=E2=80=A6"]`=20(from=20servo:link-args);=20r=3Dnox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latter is an unstable feature that might be changed or removed. Source-Repo: https://github.com/servo/servo Source-Revision: a5100e3c783f140c368da89e25e50581dce91bfd --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 1f54e2e26a5886ae1b029a72ee98f9e0a1f81d9e --- servo/ports/cef/lib.rs | 5 ----- servo/python/servo/build_commands.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/servo/ports/cef/lib.rs b/servo/ports/cef/lib.rs index ce73994b326b..269d106d1675 100644 --- a/servo/ports/cef/lib.rs +++ b/servo/ports/cef/lib.rs @@ -4,7 +4,6 @@ #![allow(non_camel_case_types)] #![feature(core_intrinsics)] -#![feature(link_args)] #[macro_use] extern crate log; @@ -27,10 +26,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")] diff --git a/servo/python/servo/build_commands.py b/servo/python/servo/build_commands.py index 0d0dbc0ebcd3..ec20f18af5a3 100644 --- a/servo/python/servo/build_commands.py +++ b/servo/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