rust/mk
bors c13a929d58 auto merge of #12020 : alexcrichton/rust/output-flags, r=brson
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib,
--lib, and --bin flags from rustc, adding the following flags:

* --emit=[asm,ir,bc,obj,link]
* --crate-type=[dylib,rlib,staticlib,bin,lib]

The -o option has also been redefined to be used for *all* flavors of outputs.
This means that we no longer ignore it for libraries. The --out-dir remains the
same as before.

The new logic for files that rustc emits is as follows:

1. Output types are dictated by the --emit flag. The default value is
   --emit=link, and this option can be passed multiple times and have all options
   stacked on one another.
2. Crate types are dictated by the --crate-type flag and the #[crate_type]
   attribute. The flags can be passed many times and stack with the crate
   attribute.
3. If the -o flag is specified, and only one output type is specified, the
   output will be emitted at this location. If more than one output type is
   specified, then the filename of -o is ignored, and all output goes in the
   directory that -o specifies. The -o option always ignores the --out-dir
   option.
4. If the --out-dir flag is specified, all output goes in this directory.
5. If -o and --out-dir are both not present, all output goes in the directory of
   the crate file.
6. When multiple output types are specified, the filestem of all output is the
   same as the name of the CrateId (derived from a crate attribute or from the
   filestem of the crate file).

Closes #7791
Closes #11056
Closes #11667
2014-02-06 12:41:30 -08:00
..
clean.mk Rewrite the doc makefile for doc => src/doc 2014-02-02 10:59:27 -08:00
crates.mk auto merge of #12020 : alexcrichton/rust/output-flags, r=brson 2014-02-06 12:41:30 -08:00
ctags.mk Don't make tags for our dependencies and tests. 2013-11-16 13:44:52 +11:00
dist.mk Remove rustpkg. 2014-02-02 03:08:56 -05:00
docs.mk Rewrite the doc makefile for doc => src/doc 2014-02-02 10:59:27 -08:00
host.mk Refactor the build system for easily adding crates 2014-01-26 00:53:41 -08:00
install.mk auto merge of #11903 : alexcrichton/rust/android-test-deps, r=huonw 2014-01-29 01:06:41 -08:00
llvm.mk Only build LLVM tools Rust needs. 2014-01-15 17:47:48 -08:00
perf.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
platform.mk auto merge of #11879 : thestinger/rust/frame-pointer, r=alexcrichton 2014-01-29 13:36:40 -08:00
rt.mk Remove VPATH usage in Makefiles 2014-02-02 10:59:14 -08:00
rustllvm.mk Remove VPATH usage in Makefiles 2014-02-02 10:59:14 -08:00
snap.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
stage0.mk Make rustc's own lib directory configurable and change the default to rustlib. Fixes #3319 2014-01-05 12:06:20 +01:00
target.mk Refactor the build system for easily adding crates 2014-01-26 00:53:41 -08:00
tests.mk Redesign output flags for rustc 2014-02-06 11:14:13 -08:00