diff --git a/.cargo/config b/.cargo/config index 18115efa62c..80801fe901a 100644 --- a/.cargo/config +++ b/.cargo/config @@ -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" diff --git a/appveyor.yml b/appveyor.yml index 5092ebf910c..641b861165a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/components/script/build.rs b/components/script/build.rs index 21697db873c..1594f96b88a 100644 --- a/components/script/build.rs +++ b/components/script/build.rs @@ -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 diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 8033c6859eb..d516f1639dc 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -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.")