rust/compiler/rustc_interface
Nicholas Nethercote 62c32aeeab Construct SourceMap at the same time as SessionGlobals.
Currently `SourceMap` is constructed slightly later than
`SessionGlobals`, and inserted. This commit changes things so they are
done at the same time.

Benefits:
- `SessionGlobals::source_map` changes from
  `Lock<Option<Lrc<SourceMap>>>` to `Option<Lrc<SourceMap>>`. It's still
  optional, but mutability isn't required because it's initialized at
  construction.
- `set_source_map` is removed, simplifying `run_compiler`, which is
  good because that's a critical function and it's nice to make it
  simpler.

This requires moving things around a bit, so the necessary inputs are
available when `SessionGlobals` is created, in particular the `loader`
and `hash_kind`, which are no longer computed by `build_session`. These
inputs are captured by the new `SourceMapInputs` type, which is threaded
through various places.
2024-04-16 13:02:53 +10:00
..
src Construct SourceMap at the same time as SessionGlobals. 2024-04-16 13:02:53 +10:00
Cargo.toml Unify dylib loading between proc macros and codegen backends 2024-02-21 11:17:07 +00:00
messages.ftl Make incremental sessions identity no longer depend on the crate names provided by source code 2024-03-13 16:40:02 +01:00