rust/compiler/rustc_session/src
Matthias Krüger 0f72a6d617
Rollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister
Allow use of `-Clto=thin` with `-Ccodegen-units=1` in general

The current logic to ignore ThinLTO when `-Ccodegen-units=1` makes sense for local ThinLTO but even in this scenario, a user may still want (non-local) ThinLTO for the purpose of optimizing dependencies into the final crate which is being compiled with 1 CGU.

The previous behavior was even more confusing because if you were generating a binary (`--emit=link`), then you would get ThinLTO but if you asked for LLVM IR or bytecode, then it would silently change to using regular LTO.

With this change, we only override the defaults for local ThinLTO if you ask for a single output such as LLVM IR or bytecode and in all other cases honor the requested LTO setting.

r? `@michaelwoerister`
2022-11-02 22:06:26 +01:00
..
config Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
cgu_reuse_tracker.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
code_stats.rs avoid some Symbol to String conversions 2022-07-17 04:09:20 +09:00
config.rs Rollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister 2022-11-02 22:06:26 +01:00
cstore.rs change rlib format to discern native dependencies 2022-09-12 16:45:03 +03:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
filesearch.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
options.rs Rollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister 2022-11-02 22:06:26 +01:00
output.rs translations(rustc_session): migrate output.rs 2022-09-10 08:19:17 +02:00
parse.rs Add more track_caller 2022-10-31 16:14:29 +01:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
session.rs Rollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister 2022-11-02 22:06:26 +01:00
utils.rs Get rid of native_library projection queries 2022-10-19 16:21:21 +02:00