From 817aa49dc7abc73863560c510cd81a2fad8f854b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 24 Apr 2019 15:07:31 -0400 Subject: [PATCH 1/3] Update cmake for MSVC builds. --- python/servo/packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/packages.py b/python/servo/packages.py index c6cea729515..18940cb79e2 100644 --- a/python/servo/packages.py +++ b/python/servo/packages.py @@ -3,7 +3,7 @@ # You can obtain one at https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { - "cmake": "3.7.2", + "cmake": "3.14.3", "llvm": "7.0.0", "moztools": "3.2", "ninja": "1.7.1", From c038ba4c7c98a21ccbf7f415a7bbc14231d6920a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 24 Apr 2019 16:19:37 -0400 Subject: [PATCH 2/3] Force the use of clang-cl.exe for Windows builds. --- .cargo/config | 4 ++-- appveyor.yml | 3 +++ components/script/build.rs | 5 ----- python/servo/build_commands.py | 4 ++++ 4 files changed, 9 insertions(+), 7 deletions(-) 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.") From 0136e5a2dbcb539ec7b35ed677c4a13a554639d8 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 25 Apr 2019 01:32:40 -0400 Subject: [PATCH 3/3] Update mozjs. --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f400c75e2af..50ad196ed72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2810,13 +2810,13 @@ dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mozjs_sys 0.61.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mozjs_sys 0.61.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mozjs_sys" -version = "0.61.11" +version = "0.61.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5593,7 +5593,7 @@ dependencies = [ "checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f" "checksum mozangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "45a8a18a41cfab0fde25cc2f43ea89064d211a0fbb33225b8ff93ab20406e0e7" "checksum mozjs 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "622108d35f4fdd68b3aa39bfe9bedaee5fa9efd19711d046e1d56ff607c0a36f" -"checksum mozjs_sys 0.61.11 (registry+https://github.com/rust-lang/crates.io-index)" = "22ab5d3738fc69d394b30e1256d2cbf5b4f1e668a7deba94f9f3726dcfc89689" +"checksum mozjs_sys 0.61.12 (registry+https://github.com/rust-lang/crates.io-index)" = "370887111c83436555cde840bb2639c5a088c77f01b152957d99e1f279397f48" "checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729" "checksum muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "451a9a05d2a32c566c897835e0ea95cf79ed2fdfe957924045a1721a36c9980f" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"