mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Auto merge of #23256 - jdm:clang-cl, r=asajeffrey
Use clang-cl for Windows builds Depends on https://github.com/servo/mozjs/pull/178. <!-- 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/23256) <!-- Reviewable:end -->
This commit is contained in:
commit
36bb42525a
6 changed files with 13 additions and 11 deletions
|
@ -22,5 +22,5 @@ ar = "arm-linux-gnueabihf-ar"
|
||||||
linker = "aarch64-linux-gnu-gcc"
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
ar = "aarch64-linux-gnu-ar"
|
ar = "aarch64-linux-gnu-ar"
|
||||||
|
|
||||||
[target.'cfg(target_os=windows)']
|
[target.x86_64-pc-windows-msvc]
|
||||||
linker = "./support/android/fakeld/fake-ld.cmd"
|
linker = "lld-link.exe"
|
||||||
|
|
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -2810,13 +2810,13 @@ dependencies = [
|
||||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozjs_sys"
|
name = "mozjs_sys"
|
||||||
version = "0.61.11"
|
version = "0.61.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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 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 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 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 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 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"
|
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
|
||||||
|
|
|
@ -30,6 +30,9 @@ environment:
|
||||||
C:\\Program Files\\Git\\cmd;\
|
C:\\Program Files\\Git\\cmd;\
|
||||||
C:\\Program Files\\Git\\usr\\bin;\
|
C:\\Program Files\\Git\\usr\\bin;\
|
||||||
C:\\Program Files\\AppVeyor\\BuildAgent;"
|
C:\\Program Files\\AppVeyor\\BuildAgent;"
|
||||||
|
CC: "clang-cl.exe"
|
||||||
|
CXX: "clang-cl.exe"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- TARGET: nightly-x86_64-pc-windows-msvc
|
- 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,
|
// We must use Ninja on Windows for this -- msbuild is painfully slow,
|
||||||
// and ninja is easier to install than make.
|
// and ninja is easier to install than make.
|
||||||
build.generator("Ninja");
|
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,
|
// We have to explicitly specify the full path to link.exe,
|
||||||
// for reasons that I don't understand. If we just give
|
// for reasons that I don't understand. If we just give
|
||||||
// link.exe, it tries to use script-*/out/link.exe, which of
|
// link.exe, it tries to use script-*/out/link.exe, which of
|
||||||
|
|
|
@ -310,6 +310,10 @@ class MachCommands(CommandBase):
|
||||||
if with_debug_assertions:
|
if with_debug_assertions:
|
||||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C 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:
|
||||||
if "ANDROID_NDK" not in env:
|
if "ANDROID_NDK" not in env:
|
||||||
print("Please set the ANDROID_NDK environment variable.")
|
print("Please set the ANDROID_NDK environment variable.")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
WINDOWS_MSVC = {
|
WINDOWS_MSVC = {
|
||||||
"cmake": "3.7.2",
|
"cmake": "3.14.3",
|
||||||
"llvm": "7.0.0",
|
"llvm": "7.0.0",
|
||||||
"moztools": "3.2",
|
"moztools": "3.2",
|
||||||
"ninja": "1.7.1",
|
"ninja": "1.7.1",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue