mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Auto merge of #11122 - mbrubeck:unify-builds, r=larsbergstrom
Use the same build environment and features for CEF, Servo, Gonk, Geckolib * Remove unnecessary dependencies and features from top-level Cargo.tomls. The features for each crate will be computed based on the union of features specified in the dependency graph. Specifying the same ones again just adds more ways for them to get out of sync. * Move all cargo build environment variables into CommandBase Fixes #11112. r? @metajack (Not included: CI test to make sure #11112 doesn't regress again.) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11122) <!-- Reviewable:end -->
This commit is contained in:
commit
7f76e3ba74
12 changed files with 28 additions and 50 deletions
|
@ -256,7 +256,7 @@ class CommandBase(object):
|
|||
" --release" if release else ""))
|
||||
sys.exit()
|
||||
|
||||
def build_env(self, gonk=False, hosts_file_path=None):
|
||||
def build_env(self, gonk=False, hosts_file_path=None, target=None):
|
||||
"""Return an extended environment dictionary."""
|
||||
env = os.environ.copy()
|
||||
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
||||
|
@ -400,6 +400,16 @@ class CommandBase(object):
|
|||
if subprocess.call(['which', 'ld.gold'], stdout=PIPE, stderr=PIPE) == 0:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C link-args=-fuse-ld=gold"
|
||||
|
||||
if not (self.config["build"]["ccache"] == ""):
|
||||
env['CCACHE'] = self.config["build"]["ccache"]
|
||||
|
||||
# Ensure Rust uses hard floats and SIMD on ARM devices
|
||||
if target:
|
||||
if target.startswith('arm') or target.startswith('aarch64'):
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C target-feature=+neon"
|
||||
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -W unused-extern-crates"
|
||||
|
||||
return env
|
||||
|
||||
def servo_crate(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue