rust/compiler
bors f2ea2f648e Auto merge of #77729 - petrochenkov:mergetarg, r=Mark-Simulacrum
rustc_target: Move some target options from `Target` to `TargetOptions`

The only reason for `Target` to `TargetOptions` to be separate structures is that options in `TargetOptions` have reasonable defaults and options in `Target` don't.
(Otherwise all the options logically belong to a single `Target` struct.)

This PR moves a number of options with reasonable defaults from `Target` to `TargetOptions`, so they no longer needs to be specified explicitly for majority of the targets.
The move also allows to inherit the options from `rustc_target/src/spec/*_base.rs` files in a nicer way.
I didn't change any specific option values here.

The moved options are `target_c_int_width` (defaults to `"32"`), `target_endian` (defaults to `"little"`), `target_os` (defaults to `"none"`), `target_env` (defaults to `""`), `target_vendor` (defaults to `"unknown"`) and `linker_flavor` (defaults to `LinkerFlavor::Gcc`).

Next steps (in later PRs):
- Find a way to merge `TargetOptions` into `Target`
- If not, always access `TargetOptions` fields through `Deref` making it a part of `Target` at least logically (`session.target.target.options.foo` -> `session.target.target.foo`)
- ~Eliminate `session::config::Config` and use `Target` instead (`session.target.target.foo` -> `session.target.foo`)~ Done in https://github.com/rust-lang/rust/pull/77943.
- Avoid tautologies in option names (`target.target_os` -> `target.os`)
- Resolve _ https://github.com/rust-lang/rust/issues/77730 (rustc_target: The differences between `target_os = "none"` and `target_os = "unknown"`, and `target_vendor = "unknown"` and `target_vendor = ""` are unclear) noticed during implementation of this PR.
2020-11-08 02:21:55 +00:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_ast The renumber pass is long gone 2020-11-06 03:18:01 +01:00
rustc_ast_lowering Implement rustc side of report-future-incompat 2020-10-30 20:02:14 -04:00
rustc_ast_passes Fix typos 2020-10-29 16:51:46 +01:00
rustc_ast_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_attr Improve deprecation attribute diagnostic messages. 2020-11-02 13:21:18 +01:00
rustc_builtin_macros Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_codegen_cranelift Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514 2020-11-07 01:02:14 +09:00
rustc_codegen_llvm Addressed all feedback to date 2020-11-05 18:24:17 -08:00
rustc_codegen_ssa Addressed all feedback to date 2020-11-05 18:24:17 -08:00
rustc_data_structures Move post order walk to iterative approach 2020-10-31 18:52:00 +01:00
rustc_driver Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_error_codes deny(invalid_codeblock_attributes) 2020-11-05 12:13:28 -05:00
rustc_errors Auto merge of #76931 - oli-obk:const_prop_inline_lint_madness, r=wesleywiser 2020-11-03 16:32:34 +00:00
rustc_expand rustc_expand: use collect_bang helper instead of manual reimplementation 2020-11-06 03:16:56 +01:00
rustc_feature Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_fs_util Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_graphviz Rust coverage before splitting instrument_coverage.rs 2020-11-05 18:24:12 -08:00
rustc_hir Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_hir_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_incremental Delete files immediately, instead of collecting into vector 2020-10-28 17:22:10 +01:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_interface fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_lexer Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_lint Rename lint to non_autolinks 2020-11-05 10:22:08 +01:00
rustc_lint_defs Fix more URLs 2020-11-05 10:23:39 +01:00
rustc_llvm Rollup merge of #77950 - arlosi:sha256, r=eddyb 2020-11-03 19:32:26 +01:00
rustc_macros Remove implicit Continue type 2020-10-30 12:27:47 +01:00
rustc_metadata Auto merge of #78448 - rylev:cache-foreign_modules, r=wesleywiser 2020-11-03 04:27:27 +00:00
rustc_middle Auto merge of #78267 - richkadel:llvm-coverage-counters-2.0.3r1, r=tmandry 2020-11-06 06:59:44 +00:00
rustc_mir Rollup merge of #78798 - ankushduacodes:fixing-typo, r=jonas-schievink 2020-11-07 01:02:30 +09:00
rustc_mir_build Rollup merge of #78167 - Nadrieril:fix-76836_, r=varkor 2020-11-07 01:02:05 +09:00
rustc_parse Fix even more URLs 2020-11-05 20:11:29 +01:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Rollup merge of #78626 - fusion-engineering-forks:deprecated-trait-impl, r=estebank 2020-11-03 19:32:36 +01:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy Fix even more URLs 2020-11-05 20:11:29 +01:00
rustc_query_system Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_resolve Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case"" 2020-11-06 11:22:13 -05:00
rustc_save_analysis Show the inline stack of MIR lints that only occur after inlining 2020-10-27 14:08:07 +00:00
rustc_serialize Replace absolute paths with relative ones 2020-10-13 14:16:45 +02:00
rustc_session Responded to all feedback as of 2020-10-30 2020-11-05 18:24:18 -08:00
rustc_span fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_symbol_mangling u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_target Update recently added targets 2020-11-07 14:34:44 +03:00
rustc_trait_selection Auto merge of #77856 - GuillaumeGomez:automatic-links-lint, r=jyn514,ollie27 2020-11-06 04:17:41 +00:00
rustc_traits Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obk 2020-10-30 22:53:55 +00:00
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Fixing Spelling Typos 2020-11-06 09:25:58 +05:30