Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e0cac1
rustdoc: refactor `notable_traits_decl` to just act on the type directly
notriddle Nov 7, 2022
303653e
rustdoc: use javascript to layout notable traits popups
notriddle Nov 7, 2022
a45151e
rustdoc: fix font color inheritance from body, and test
notriddle Nov 8, 2022
9bcc083
run-make-fulldeps: fix split debuginfo test
davidtwco Nov 7, 2022
29dc083
llvm: dwo only emitted when object code emitted
davidtwco Nov 7, 2022
0e0bcd9
prevent uninitialized access in black_box for zero-sized-types
krasimirgg Nov 4, 2022
06a77af
Add retry flag to remote-test-server
Ayush1325 Nov 8, 2022
76cab67
Add domain size check to fix ICE
camsteffen Nov 9, 2022
bdced83
Use ObligationCtxt in expected_inputs_for_expected_outputs
compiler-errors Nov 9, 2022
07a47e0
Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures
Noratrieb Nov 9, 2022
53e8b49
rustdoc: sort output to make it deterministic
notriddle Nov 9, 2022
ed6a7cc
Remove save_and_restore_in_snapshot_flag
compiler-errors Nov 9, 2022
63217e0
make dropck_outlives into a proper canonicalized type query
compiler-errors Nov 9, 2022
3074678
Mark `trait_upcasting` feature no longer incomplete.
crlf0710 Nov 7, 2022
c31138a
Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoerister
matthiaskrgr Nov 10, 2022
efb3569
Rollup merge of #104110 - krasimirgg:msan-16, r=nagisa
matthiaskrgr Nov 10, 2022
0ff0f52
Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726
matthiaskrgr Nov 10, 2022
9d0aed9
Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait…
matthiaskrgr Nov 10, 2022
dc95ff3
Rollup merge of #104146 - Ayush1325:remote-test-server, r=jyn514
matthiaskrgr Nov 10, 2022
b5a1ec1
Rollup merge of #104202 - camsteffen:103748, r=estebank
matthiaskrgr Nov 10, 2022
de165a6
Rollup merge of #104206 - compiler-errors:ocx-more-2, r=lcnr
matthiaskrgr Nov 10, 2022
20ec6a9
Rollup merge of #104214 - Nilstrieb:returns_impl_Ice, r=compiler-errors
matthiaskrgr Nov 10, 2022
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
Prev Previous commit
Next Next commit
llvm: dwo only emitted when object code emitted
`CompiledModule` should not think a DWARF object was emitted when a
bitcode-only compilation has happened, this can confuse archive file
creation (which expects to create an archive containing non-existent dwo
files).

Signed-off-by: David Wood <[email protected]>
  • Loading branch information
davidtwco committed Nov 8, 2022
commit 29dc08307dde3051ab6bf17c53f2db99e32681ee
16 changes: 13 additions & 3 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,21 @@ pub(crate) unsafe fn codegen(
drop(handlers);
}

// `.dwo` files are only emitted if:
//
// - Object files are being emitted (i.e. bitcode only or metadata only compilations will not
// produce dwarf objects, even if otherwise enabled)
// - Target supports Split DWARF
// - Split debuginfo is enabled
// - Split DWARF kind is `split` (i.e. debuginfo is split into `.dwo` files, not different
// sections in the `.o` files).
let dwarf_object_emitted = matches!(config.emit_obj, EmitObj::ObjectCode(_))
&& cgcx.target_can_use_split_dwarf
&& cgcx.split_debuginfo != SplitDebuginfo::Off
&& cgcx.split_dwarf_kind == SplitDwarfKind::Split;
Ok(module.into_compiled_module(
config.emit_obj != EmitObj::None,
cgcx.target_can_use_split_dwarf
&& cgcx.split_debuginfo != SplitDebuginfo::Off
&& cgcx.split_dwarf_kind == SplitDwarfKind::Split,
dwarf_object_emitted,
config.emit_bc,
&cgcx.output_filenames,
))
Expand Down
56 changes: 54 additions & 2 deletions src/test/run-make-fulldeps/split-debuginfo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ off:
[ ! -f $(TMPDIR)/*.dwp ]
[ ! -f $(TMPDIR)/*.dwo ]

packed: packed-split packed-single packed-remapped packed-crosscrate
packed: packed-split packed-single packed-lto packed-remapped packed-crosscrate

# - Debuginfo in `.dwo` files
# - `.o` deleted
Expand All @@ -77,6 +77,32 @@ packed-single:
rm $(TMPDIR)/foo.dwp
rm $(TMPDIR)/$(call BIN,foo)

packed-lto: packed-lto-split packed-lto-single

# - rmeta file added to rlib, no object files are generated and thus no debuginfo is generated
# - `.o` never created
# - `.dwo` never created
# - `.dwp` never created
packed-lto-split:
$(RUSTC) baz.rs -g $(UNSTABLEOPTS) -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split \
--crate-type=rlib -Clinker-plugin-lto
ls $(TMPDIR)/*.o && exit 1 || exit 0
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
rm $(TMPDIR)/libbaz.rlib

# - rmeta file added to rlib, no object files are generated and thus no debuginfo is generated
# - `.o` never created
# - `.dwo` never created
# - `.dwp` never created
packed-lto-single:
$(RUSTC) baz.rs -g $(UNSTABLEOPTS) -Csplit-debuginfo=packed -Zsplit-dwarf-kind=single \
--crate-type=rlib -Clinker-plugin-lto
ls $(TMPDIR)/*.o && exit 1 || exit 0
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
rm $(TMPDIR)/libbaz.rlib

packed-remapped: packed-remapped-split packed-remapped-single

# - Debuginfo in `.dwo` files
Expand Down Expand Up @@ -153,7 +179,7 @@ packed-crosscrate-single:
rm $(TMPDIR)/main.dwp
rm $(TMPDIR)/$(call BIN,main)

unpacked: unpacked-split unpacked-single unpacked-remapped unpacked-crosscrate
unpacked: unpacked-split unpacked-single unpacked-lto unpacked-remapped unpacked-crosscrate

# - Debuginfo in `.dwo` files
# - `.o` deleted
Expand All @@ -177,6 +203,32 @@ unpacked-single:
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
rm $(TMPDIR)/$(call BIN,foo)

unpacked-lto: packed-lto-split packed-lto-single

# - rmeta file added to rlib, no object files are generated and thus no debuginfo is generated
# - `.o` never created
# - `.dwo` never created
# - `.dwp` never created
unpacked-lto-split:
$(RUSTC) baz.rs -g $(UNSTABLEOPTS) -Csplit-debuginfo=unpacked -Zsplit-dwarf-kind=split \
--crate-type=rlib -Clinker-plugin-lto
ls $(TMPDIR)/*.o && exit 1 || exit 0
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
rm $(TMPDIR)/libbaz.rlib

# - rmeta file added to rlib, no object files are generated and thus no debuginfo is generated
# - `.o` never created
# - `.dwo` never created
# - `.dwp` never created
unpacked-lto-single:
$(RUSTC) baz.rs -g $(UNSTABLEOPTS) -Csplit-debuginfo=unpacked -Zsplit-dwarf-kind=single \
--crate-type=rlib -Clinker-plugin-lto
ls $(TMPDIR)/*.o && exit 1 || exit 0
ls $(TMPDIR)/*.dwo && exit 1 || exit 0
ls $(TMPDIR)/*.dwp && exit 1 || exit 0
rm $(TMPDIR)/libbaz.rlib

unpacked-remapped: unpacked-remapped-split unpacked-remapped-single

# - Debuginfo in `.dwo` files
Expand Down
1 change: 1 addition & 0 deletions src/test/run-make-fulldeps/split-debuginfo/baz.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// empty