mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
Force the use of clang-cl.exe for Windows builds.
This commit is contained in:
parent
817aa49dc7
commit
c038ba4c7c
4 changed files with 9 additions and 7 deletions
|
@ -22,5 +22,5 @@ ar = "arm-linux-gnueabihf-ar"
|
|||
linker = "aarch64-linux-gnu-gcc"
|
||||
ar = "aarch64-linux-gnu-ar"
|
||||
|
||||
[target.'cfg(target_os=windows)']
|
||||
linker = "./support/android/fakeld/fake-ld.cmd"
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
linker = "lld-link.exe"
|
||||
|
|
|
@ -30,6 +30,9 @@ environment:
|
|||
C:\\Program Files\\Git\\cmd;\
|
||||
C:\\Program Files\\Git\\usr\\bin;\
|
||||
C:\\Program Files\\AppVeyor\\BuildAgent;"
|
||||
CC: "clang-cl.exe"
|
||||
CXX: "clang-cl.exe"
|
||||
|
||||
matrix:
|
||||
- TARGET: nightly-x86_64-pc-windows-msvc
|
||||
|
||||
|
|
|
@ -25,11 +25,6 @@ fn main() {
|
|||
// We must use Ninja on Windows for this -- msbuild is painfully slow,
|
||||
// and ninja is easier to install than make.
|
||||
build.generator("Ninja");
|
||||
// because we're using ninja, we need to explicitly set these
|
||||
// to VC++, otherwise it'll try to use cc
|
||||
build
|
||||
.define("CMAKE_C_COMPILER", "cl.exe")
|
||||
.define("CMAKE_CXX_COMPILER", "cl.exe");
|
||||
// We have to explicitly specify the full path to link.exe,
|
||||
// for reasons that I don't understand. If we just give
|
||||
// link.exe, it tries to use script-*/out/link.exe, which of
|
||||
|
|
|
@ -310,6 +310,10 @@ 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"
|
||||
|
||||
if android:
|
||||
if "ANDROID_NDK" not in env:
|
||||
print("Please set the ANDROID_NDK environment variable.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue