Skip to content

Commit

Permalink
fix windows cross-compilation
Browse files Browse the repository at this point in the history
Similar to the Linux case, we were checking the host's pointer width,
rather than the target's pointer width.
  • Loading branch information
froydnj committed May 17, 2017
1 parent 5361544 commit 96a03d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/style/build_gecko.rs
Expand Up @@ -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");
Expand Down

0 comments on commit 96a03d9

Please sign in to comment.