aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@gmail.com>2017-05-17 10:03:54 -0400
committerNathan Froyd <froydnj@gmail.com>2017-05-17 10:17:40 -0400
commit96a03d93b66970b20bf21bef6a3fa53510066eff (patch)
treed9d053bfb90ae504620c95da16ceab645322f197
parent536154475cd7508744efc20388c8b3619fe9747f (diff)
downloadservo-96a03d93b66970b20bf21bef6a3fa53510066eff.tar.gz
servo-96a03d93b66970b20bf21bef6a3fa53510066eff.zip
fix windows cross-compilation
Similar to the Linux case, we were checking the host's pointer width, rather than the target's pointer width.
-rw-r--r--components/style/build_gecko.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs
index 37b8caaf851..4a603f0ede2 100644
--- a/components/style/build_gecko.rs
+++ b/components/style/build_gecko.rs
@@ -193,7 +193,8 @@ mod bindings {
// thus not enabled by default with a MSVC-compatibile build)
// to exclude hidden symbols from the generated file.
.clang_arg("-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1");
- if cfg!(target_pointer_width = "32") {
+ let pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap();
+ if pointer_width == "32" {
builder = builder.clang_arg("--target=i686-pc-win32");
} else {
builder = builder.clang_arg("--target=x86_64-pc-win32");