Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bootstrap.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,10 @@
# its historical default, but when compiling the compiler itself, we skip it by
# default since we know it's safe to do so in that case.
#
# On Windows platforms, packed debuginfo is the only supported option,
# producing a `.pdb` file.
#split-debuginfo = if linux { off } else if windows { packed } else if apple { unpacked }
# On Windows MSVC platforms, packed debuginfo is the only supported option,
# producing a `.pdb` file. On Windows GNU rustc doesn't support splitting debuginfo,
# and enabling it causes issues.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be warning about it from rustc and/or erroring out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly? I don't know.

I haven't tried that but it should be possible to make split debuginfo work with the right combination of linker flags. For example when linking with LLD one can add argument to create .pdb files with debuginfo. I don't know whether this needs compiler support.

I'm totally clueless whether split debuginfo is possible with Dwarf on Windows.

#split-debuginfo = if linux || windows-gnu { off } else if windows-msvc { packed } else if apple { unpacked }

# Path to the `llvm-config` binary of the installation of a custom LLVM to link
# against. Note that if this is specified we don't compile LLVM at all for this
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/config/target_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl SplitDebuginfo {
pub fn default_for_platform(target: TargetSelection) -> Self {
if target.contains("apple") {
SplitDebuginfo::Unpacked
} else if target.is_windows() {
} else if target.is_msvc() {
SplitDebuginfo::Packed
} else {
SplitDebuginfo::Off
Expand Down
Loading