Auto merge of #23583 - servo:jdm-patch-56, r=SimonSapin

Force clang use on all platforms.

gcc builds are unlinkable on Linux at the moment. Let's standardize on clang.

<!-- 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/23583)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-06-27 13:34:20 -04:00 committed by GitHub
commit 9e12b4175e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,10 +316,6 @@ class MachCommands(CommandBase):
if with_debug_assertions:
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
if sys.platform == "win32":
env["CC"] = "clang-cl.exe"
env["CXX"] = "clang-cl.exe"
host = host_triple()
if 'apple-darwin' in host and (not target or target == host):
if 'CXXFLAGS' not in env:
@ -609,6 +605,13 @@ class MachCommands(CommandBase):
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