-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 current directory of the process. 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
- Loading branch information
1 parent
f039d10
commit 6e7968b
Showing
30 changed files
with
417 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
6e7968b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at alexcrichton@6e7968b
6e7968b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/output-flags = 6e7968b into auto
6e7968b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/output-flags = 6e7968b merged ok, testing candidate = c13a929
6e7968b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4061
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/1903
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/1905
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4061
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3161
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3167
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4076
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3164
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3170
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4078
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3164
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3169
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3238
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1016
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4069
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3170
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3175
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/3838
6e7968b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = c13a929