auto merge of #15518 : alexcrichton/rust/fix-some-crate-names, r=sfackler
The output file was only being renamed based off #[crate_name], not #[crate_id] or --crate-name. Both of these behaviors have been restored now.
This commit is contained in:
commit
bfe4ddfdea
5 changed files with 54 additions and 5 deletions
13
src/test/run-make/crate-name-priority/Makefile
Normal file
13
src/test/run-make/crate-name-priority/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-include ../tools.mk
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs
|
||||
rm $(TMPDIR)/$(call BIN,foo)
|
||||
$(RUSTC) foo.rs --crate-name bar
|
||||
rm $(TMPDIR)/$(call BIN,bar)
|
||||
$(RUSTC) foo1.rs
|
||||
rm $(TMPDIR)/$(call BIN,foo)
|
||||
$(RUSTC) foo1.rs --crate-name bar
|
||||
rm $(TMPDIR)/$(call BIN,bar)
|
||||
$(RUSTC) foo1.rs --crate-name bar -o $(TMPDIR)/bar1
|
||||
rm $(TMPDIR)/$(call BIN,bar1)
|
||||
11
src/test/run-make/crate-name-priority/foo.rs
Normal file
11
src/test/run-make/crate-name-priority/foo.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
fn main() {}
|
||||
14
src/test/run-make/crate-name-priority/foo1.rs
Normal file
14
src/test/run-make/crate-name-priority/foo1.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2014 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.
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
fn main() {}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue