From 31bda236bd7573482614f86998536ce3b2ba98f5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 25 Dec 2016 02:09:10 +0000 Subject: [PATCH 1/2] Emscripten targets are Unix targets --- src/librustc_back/target/asmjs_unknown_emscripten.rs | 1 + src/librustc_back/target/wasm32_unknown_emscripten.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/librustc_back/target/asmjs_unknown_emscripten.rs b/src/librustc_back/target/asmjs_unknown_emscripten.rs index d86a9b09327..51befa78ed3 100644 --- a/src/librustc_back/target/asmjs_unknown_emscripten.rs +++ b/src/librustc_back/target/asmjs_unknown_emscripten.rs @@ -32,6 +32,7 @@ pub fn target() -> Result { target_os: "emscripten".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), + target_family: Some("unix".to_string()), data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(), arch: "asmjs".to_string(), options: opts, diff --git a/src/librustc_back/target/wasm32_unknown_emscripten.rs b/src/librustc_back/target/wasm32_unknown_emscripten.rs index 77ab4fcae70..574dbe980f1 100644 --- a/src/librustc_back/target/wasm32_unknown_emscripten.rs +++ b/src/librustc_back/target/wasm32_unknown_emscripten.rs @@ -35,6 +35,7 @@ pub fn target() -> Result { target_os: "emscripten".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), + target_family: Some("unix".to_string()), data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(), arch: "wasm32".to_string(), options: opts, From f262eea2ee0108586d53d6181f813b288de50209 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 25 Dec 2016 14:03:44 -0800 Subject: [PATCH 2/2] Move target_family to TargetOptions, not Target Just fixing a compile error --- src/librustc_back/target/asmjs_unknown_emscripten.rs | 2 +- src/librustc_back/target/wasm32_unknown_emscripten.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_back/target/asmjs_unknown_emscripten.rs b/src/librustc_back/target/asmjs_unknown_emscripten.rs index 51befa78ed3..98a9e343d00 100644 --- a/src/librustc_back/target/asmjs_unknown_emscripten.rs +++ b/src/librustc_back/target/asmjs_unknown_emscripten.rs @@ -23,6 +23,7 @@ pub fn target() -> Result { obj_is_bitcode: true, max_atomic_width: Some(32), post_link_args: vec!["-s".to_string(), "ERROR_ON_UNDEFINED_SYMBOLS=1".to_string()], + target_family: Some("unix".to_string()), .. Default::default() }; Ok(Target { @@ -32,7 +33,6 @@ pub fn target() -> Result { target_os: "emscripten".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), - target_family: Some("unix".to_string()), data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(), arch: "asmjs".to_string(), options: opts, diff --git a/src/librustc_back/target/wasm32_unknown_emscripten.rs b/src/librustc_back/target/wasm32_unknown_emscripten.rs index 574dbe980f1..fec269074da 100644 --- a/src/librustc_back/target/wasm32_unknown_emscripten.rs +++ b/src/librustc_back/target/wasm32_unknown_emscripten.rs @@ -26,6 +26,7 @@ pub fn target() -> Result { max_atomic_width: Some(32), post_link_args: vec!["-s".to_string(), "BINARYEN=1".to_string(), "-s".to_string(), "ERROR_ON_UNDEFINED_SYMBOLS=1".to_string()], + target_family: Some("unix".to_string()), .. Default::default() }; Ok(Target { @@ -35,7 +36,6 @@ pub fn target() -> Result { target_os: "emscripten".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), - target_family: Some("unix".to_string()), data_layout: "e-p:32:32-i64:64-v128:32:128-n32-S128".to_string(), arch: "wasm32".to_string(), options: opts,