Partial fix for #38489.
This commit is contained in:
parent
c217ab6c8d
commit
a397add8a7
@ -9,11 +9,12 @@
|
||||
// except according to those terms.
|
||||
|
||||
use super::{Target, TargetOptions};
|
||||
use super::emscripten_base::{cmd};
|
||||
|
||||
pub fn target() -> Result<Target, String> {
|
||||
let opts = TargetOptions {
|
||||
linker: "emcc".to_string(),
|
||||
ar: "emar".to_string(),
|
||||
linker: cmd("emcc"),
|
||||
ar: cmd("emar"),
|
||||
|
||||
dynamic_linking: false,
|
||||
executables: true,
|
||||
|
19
src/librustc_back/target/emscripten_base.rs
Normal file
19
src/librustc_back/target/emscripten_base.rs
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn cmd(name: &str) -> String {
|
||||
name.to_string()
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn cmd(name: &str) -> String {
|
||||
[name, ".bat"].concat()
|
||||
}
|
@ -58,6 +58,7 @@
|
||||
mod arm_base;
|
||||
mod bitrig_base;
|
||||
mod dragonfly_base;
|
||||
mod emscripten_base;
|
||||
mod freebsd_base;
|
||||
mod haiku_base;
|
||||
mod linux_base;
|
||||
|
@ -9,11 +9,12 @@
|
||||
// except according to those terms.
|
||||
|
||||
use super::{Target, TargetOptions};
|
||||
use super::emscripten_base::{cmd};
|
||||
|
||||
pub fn target() -> Result<Target, String> {
|
||||
let opts = TargetOptions {
|
||||
linker: "emcc".to_string(),
|
||||
ar: "emar".to_string(),
|
||||
linker: cmd("emcc"),
|
||||
ar: cmd("emar"),
|
||||
|
||||
dynamic_linking: false,
|
||||
executables: true,
|
||||
|
Loading…
Reference in New Issue
Block a user