Skip to content

Commit 8ea90c2

Browse files
committed
---
yaml --- r: 235199 b: refs/heads/stable c: 555b021 h: refs/heads/master i: 235197: c008265 235195: dd60324 235191: 31afdad 235183: 5052f9d 235167: 1b26bb9 235135: 8de4837 v: v3
1 parent 389ba88 commit 8ea90c2

File tree

23 files changed

+419
-881
lines changed

23 files changed

+419
-881
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 9d9e2678f504b4e9389d6a62d27ba4f5ee17a2f6
32+
refs/heads/stable: 555b021c6e531fc375c62160a176dcc4fe77b798
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/mk/target.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ endef
249249

250250
$(foreach host,$(CFG_HOST), \
251251
$(foreach target,$(CFG_TARGET), \
252-
$(foreach crate,$(CRATES), \
253-
$(eval $(call SETUP_LIB_MSVC_ENV_VARS,0,$(target),$(host),$(crate))))))
252+
$(foreach stage,$(STAGES), \
253+
$(foreach crate,$(CRATES), \
254+
$(eval $(call SETUP_LIB_MSVC_ENV_VARS,$(stage),$(target),$(host),$(crate)))))))
254255
$(foreach host,$(CFG_HOST), \
255256
$(foreach target,$(CFG_TARGET), \
256-
$(foreach tool,$(TOOLS), \
257-
$(eval $(call SETUP_TOOL_MSVC_ENV_VARS,0,$(target),$(host),$(tool))))))
257+
$(foreach stage,$(STAGES), \
258+
$(foreach tool,$(TOOLS), \
259+
$(eval $(call SETUP_TOOL_MSVC_ENV_VARS,$(stage),$(target),$(host),$(tool)))))))

branches/stable/src/librustc_driver/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,21 @@ pub fn commit_date_str() -> Option<&'static str> {
481481
option_env!("CFG_VER_DATE")
482482
}
483483

484+
/// Returns a stage string, such as "stage0".
485+
pub fn stage_str() -> Option<&'static str> {
486+
if cfg!(stage0) {
487+
Some("stage0")
488+
} else if cfg!(stage1) {
489+
Some("stage1")
490+
} else if cfg!(stage2) {
491+
Some("stage2")
492+
} else if cfg!(stage3) {
493+
Some("stage3")
494+
} else {
495+
None
496+
}
497+
}
498+
484499
/// Prints version information
485500
pub fn version(binary: &str, matches: &getopts::Matches) {
486501
let verbose = matches.opt_present("verbose");
@@ -493,6 +508,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
493508
println!("commit-date: {}", unw(commit_date_str()));
494509
println!("host: {}", config::host_triple());
495510
println!("release: {}", unw(release_str()));
511+
println!("stage: {}", unw(stage_str()));
496512
}
497513
}
498514

branches/stable/src/librustc_trans/back/link.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use super::archive::{Archive, ArchiveBuilder, ArchiveConfig, METADATA_FILENAME};
1212
use super::linker::{Linker, GnuLinker, MsvcLinker};
1313
use super::rpath::RPathConfig;
1414
use super::rpath;
15-
use super::msvc;
1615
use super::svh::Svh;
1716
use session::config;
1817
use session::config::NoDebugInfo;
@@ -359,14 +358,10 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
359358
mangle(path.chain(Some(gensym_name(flav))), None)
360359
}
361360

362-
pub fn get_linker(sess: &Session) -> (String, Command) {
363-
if let Some(ref linker) = sess.opts.cg.linker {
364-
(linker.clone(), Command::new(linker))
365-
} else if sess.target.target.options.is_like_msvc {
366-
("link.exe".to_string(), msvc::link_exe_cmd(sess))
367-
} else {
368-
(sess.target.target.options.linker.clone(),
369-
Command::new(&sess.target.target.options.linker))
361+
pub fn get_cc_prog(sess: &Session) -> String {
362+
match sess.opts.cg.linker {
363+
Some(ref linker) => return linker.to_string(),
364+
None => sess.target.target.options.linker.clone(),
370365
}
371366
}
372367

@@ -812,7 +807,8 @@ fn link_natively(sess: &Session, trans: &CrateTranslation, dylib: bool,
812807
let tmpdir = TempDir::new("rustc").ok().expect("needs a temp dir");
813808

814809
// The invocations of cc share some flags across platforms
815-
let (pname, mut cmd) = get_linker(sess);
810+
let pname = get_cc_prog(sess);
811+
let mut cmd = Command::new(&pname);
816812
cmd.env("PATH", command_path(sess));
817813

818814
let root = sess.target_filesearch(PathKind::Native).get_lib_path();

branches/stable/src/librustc_trans/back/msvc/mod.rs

Lines changed: 0 additions & 239 deletions
This file was deleted.

0 commit comments

Comments
 (0)