Skip to content
Permalink
Browse files

Set CC/CXX defaults right before starting cargo build.

  • Loading branch information...
jdm authored and SimonSapin committed Jun 17, 2019
1 parent f447c6b commit 6167005997186e2b05a4e79cac69cf27fadf7b3f
Showing with 7 additions and 7 deletions.
  1. +7 −7 python/servo/build_commands.py
@@ -316,13 +316,6 @@ def build(self, target=None, release=False, dev=False, jobs=None,
if with_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()
if 'apple-darwin' in host and (not target or target == host):
if 'CXXFLAGS' not in env:
@@ -612,6 +605,13 @@ def build(self, target=None, release=False, dev=False, jobs=None,
for key in env:
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)
elapsed = time() - build_start

0 comments on commit 6167005

Please sign in to comment.
You can’t perform that action at this time.