diff options
| author | jyn <github@jyn.dev> | 2023-05-08 04:12:38 -0500 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2023-05-17 23:54:21 -0500 |
| commit | d5f2b8e5c65b0406254b990296793f664c1926a0 (patch) | |
| tree | 7245f2f921a806ae8fc6dad29d543af26ab0f452 /compiler/rustc_session | |
| parent | 0dddad0dc5d614f799d7e04de4895e7a7418eccb (diff) | |
| download | rust-d5f2b8e5c65b0406254b990296793f664c1926a0.tar.gz rust-d5f2b8e5c65b0406254b990296793f664c1926a0.zip | |
Only depend on CFG_VERSION in rustc_interface
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index a988d7f28e6..cdac74759e3 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -211,6 +211,9 @@ pub struct Session { /// Set of enabled features for the current target, including unstable ones. pub unstable_target_features: FxIndexSet<Symbol>, + + /// The version of the rustc process, possibly including a commit hash and description. + pub cfg_version: &'static str, } pub struct PerfStats { @@ -1380,6 +1383,7 @@ pub fn build_session( driver_lint_caps: FxHashMap<lint::LintId, lint::Level>, file_loader: Option<Box<dyn FileLoader + Send + Sync + 'static>>, target_override: Option<Target>, + cfg_version: &'static str, ) -> Session { // FIXME: This is not general enough to make the warning lint completely override // normal diagnostic warnings, since the warning lint can also be denied and changed @@ -1524,6 +1528,7 @@ pub fn build_session( asm_arch, target_features: Default::default(), unstable_target_features: Default::default(), + cfg_version, }; validate_commandline_args_with_session_available(&sess); |
