mirror of
https://github.com/servo/servo.git
synced 2025-06-29 11:33:39 +01:00
Set CC/CXX defaults right before starting cargo build.
This commit is contained in:
parent
f447c6b1ec
commit
6167005997
1 changed files with 7 additions and 7 deletions
|
@ -316,13 +316,6 @@ class MachCommands(CommandBase):
|
||||||
if with_debug_assertions:
|
if with_debug_assertions:
|
||||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
|
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
|
||||||
|
|
||||||
if sys.platform == "win32":
|
|
||||||
env["CC"] = env.get("CC", "clang-cl.exe")
|
|
||||||
env["CXX"] = env.get("CXX", "clang-cl.exe")
|
|
||||||
else:
|
|
||||||
env["CC"] = env.get("CC", "clang")
|
|
||||||
env["CXX"] = env.get("CXX", "clang++")
|
|
||||||
|
|
||||||
host = host_triple()
|
host = host_triple()
|
||||||
if 'apple-darwin' in host and (not target or target == host):
|
if 'apple-darwin' in host and (not target or target == host):
|
||||||
if 'CXXFLAGS' not in env:
|
if 'CXXFLAGS' not in env:
|
||||||
|
@ -612,6 +605,13 @@ class MachCommands(CommandBase):
|
||||||
for key in env:
|
for key in env:
|
||||||
print((key, env[key]))
|
print((key, env[key]))
|
||||||
|
|
||||||
|
if sys.platform == "win32":
|
||||||
|
env.setdefault("CC", "clang-cl.exe")
|
||||||
|
env.setdefault("CXX", "clang-cl.exe")
|
||||||
|
else:
|
||||||
|
env.setdefault("CC", "clang")
|
||||||
|
env.setdefault("CXX", "clang++")
|
||||||
|
|
||||||
status = self.call_rustup_run(["cargo", "build"] + opts, env=env, verbose=verbose)
|
status = self.call_rustup_run(["cargo", "build"] + opts, env=env, verbose=verbose)
|
||||||
elapsed = time() - build_start
|
elapsed = time() - build_start
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue