diff options
| author | Haidong Zhang <zhanghaidong@uniontech.com> | 2025-09-03 17:40:45 +0800 |
|---|---|---|
| committer | Haidong Zhang <zhanghaidong@uniontech.com> | 2025-09-18 15:26:14 +0800 |
| commit | 6e74905be29b861bcfd2780a8c81495deffec6c3 (patch) | |
| tree | ec9020c1007bf3bbd10ec16f4abf79f86d0dfc9b /compiler/rustc_session/src/config.rs | |
| parent | 93117677d857bb7c3f12c9dc500d77839f8fb13d (diff) | |
| download | rust-6e74905be29b861bcfd2780a8c81495deffec6c3.tar.gz rust-6e74905be29b861bcfd2780a8c81495deffec6c3.zip | |
Set lto="fat" automatically when compiling with RUSTFLAGS="-Zautodiff=Enable".
Diffstat (limited to 'compiler/rustc_session/src/config.rs')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 297df7c2c97..795cb2b2cfe 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1509,6 +1509,11 @@ impl Options { pub fn get_symbol_mangling_version(&self) -> SymbolManglingVersion { self.cg.symbol_mangling_version.unwrap_or(SymbolManglingVersion::Legacy) } + + #[inline] + pub fn autodiff_enabled(&self) -> bool { + self.unstable_opts.autodiff.contains(&AutoDiff::Enable) + } } impl UnstableOptions { |
