-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cg_llvm: split dwarf support #77117
cg_llvm: split dwarf support #77117
Commits on Dec 16, 2020
-
llvm: update ffi bindings for split dwarf
This commit modifies the FFI bindings to LLVM required for Split DWARF support in rustc. In particular: - `addPassesToEmitFile`'s wrapper, `LLVMRustWriteOutputFile` now takes a `DwoPath` `const char*`. When disabled, `nullptr` should be provided which will preserve existing behaviour. When enabled, the path to the `.dwo` file should be provided. - `createCompileUnit`'s wrapper, `LLVMRustDIBuilderCreateCompileUnit` now has two additional arguments, for the `DWOId` and to enable `SplitDebugInlining`. `DWOId` should always be zero. - `createTargetMachine`'s wrapper, `LLVMRustCreateTargetMachine` has an additional argument which should be provided the path to the `.dwo` when enabled. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 341aa97 - Browse repository at this point
Copy the full SHA 341aa97View commit details -
This commit adds a flag for Split DWARF, which enables debuginfo to be split into multiple files. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 57d05d3 - Browse repository at this point
Copy the full SHA 57d05d3View commit details -
cg_ssa: correct documentation comments
This commit changes some comments to documentation comments so that they can be read on the generated rustdoc. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf49c2a - Browse repository at this point
Copy the full SHA cf49c2aView commit details -
cg_ssa: introduce
TargetMachineFactoryFn
aliasThis commit removes the `TargetMachineFactory` struct and adds a `TargetMachineFactoryFn` type alias which is used everywhere that the previous, long type was used. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6890312 - Browse repository at this point
Copy the full SHA 6890312View commit details -
bootstrap: copy
llvm-dwp
to sysroot`llvm-dwp` is required for linking the DWARF objects into DWARF packages when using Split DWARF, especially given that rustc produces multiple DWARF objects (one for each codegen unit). Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 241160d - Browse repository at this point
Copy the full SHA 241160dView commit details -
cg_llvm: implement split dwarf support
This commit implements Split DWARF support, wiring up the flag (added in earlier commits) to the modified FFI wrapper (also from earlier commits). Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e3fdae9 - Browse repository at this point
Copy the full SHA e3fdae9View commit details -
cg_clif: fix build with split dwarf
This commit makes minor changes to the cranelift backend so that it can build given changes in cg_ssa for Split DWARF. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6c4350d - Browse repository at this point
Copy the full SHA 6c4350dView commit details -
tests: add run-make-fulldeps split-dwarf test
This commit adds a run-make-fulldeps test which checks that a DWARF package file is emitted. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2b22670 - Browse repository at this point
Copy the full SHA 2b22670View commit details -
compiletest: add split dwarf compare mode
This commit adds a Split DWARF compare mode to compiletest so that debuginfo tests are also tested using Split DWARF in split mode (and manually in single mode). Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 99ad915 - Browse repository at this point
Copy the full SHA 99ad915View commit details -
cg_llvm: split dwarf filename and comp dir
llvm-dwp concatenates `DW_AT_comp_dir` with `DW_AT_GNU_dwo_name` (only when `DW_AT_comp_dir` exists), which can result in it failing to find the DWARF object files. In earlier testing, `DW_AT_comp_dir` wasn't present in the final object and the current directory was the output directory. When running tests through compiletest, the working directory of the compilation is different from output directory and that resulted in `DW_AT_comp_dir` being in the object file (and set to the current working directory, rather than the output directory), and `DW_AT_GNU_dwo_name` being set to the full path (rather than just the filename), so llvm-dwp was failing. This commit changes the compilation directory provided to LLVM to match the output directory, where DWARF objects are output; and ensures that only the filename is used for `DW_AT_GNU_dwo_name`. Signed-off-by: David Wood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee073b5 - Browse repository at this point
Copy the full SHA ee073b5View commit details