Auto merge of #113492 - nebulark:pr_96475, r=petrochenkov
Add CL and CMD into to pdb debug info
Partial fix for https://github.com/rust-lang/rust/issues/96475
The Arg0 and CommandLineArgs of the MCTargetOptions cpp class are not set within bb548f9645/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp (L378)
This causes LLVM to not neither output any compiler path (cl) nor the arguments that were used when invoking it (cmd) in the PDB file.
This fix adds the missing information to the target machine so LLVM can use it.
This commit is contained in:
commit
9be4eac264
16 changed files with 117 additions and 1 deletions
|
@ -204,6 +204,12 @@ pub struct Session {
|
|||
|
||||
/// The version of the rustc process, possibly including a commit hash and description.
|
||||
pub cfg_version: &'static str,
|
||||
|
||||
/// All commandline args used to invoke the compiler, with @file args fully expanded.
|
||||
/// This will only be used within debug info, e.g. in the pdb file on windows
|
||||
/// This is mainly useful for other tools that reads that debuginfo to figure out
|
||||
/// how to call the compiler with the same arguments.
|
||||
pub expanded_args: Vec<String>,
|
||||
}
|
||||
|
||||
pub struct PerfStats {
|
||||
|
@ -1325,6 +1331,7 @@ pub fn build_session(
|
|||
target_override: Option<Target>,
|
||||
cfg_version: &'static str,
|
||||
ice_file: Option<PathBuf>,
|
||||
expanded_args: Vec<String>,
|
||||
) -> 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
|
||||
|
@ -1467,6 +1474,7 @@ pub fn build_session(
|
|||
target_features: Default::default(),
|
||||
unstable_target_features: Default::default(),
|
||||
cfg_version,
|
||||
expanded_args,
|
||||
};
|
||||
|
||||
validate_commandline_args_with_session_available(&sess);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue