Skip to content

Commit 36e8c75

Browse files
committed
llvm: disable remarks support on LLVM 22
LLVM change dfbd76bda01e removed separate remark support entirely. That's the only mode we actually used, and it doesn't appear to be a quick change to clean that up. It also appears to be a relatively obscure unstable feature from looking in the test suite, so I'll disable it in LLVM 22 for now so we continue to get CI coverage for the rest of our functionality. @rustbot label llvm-main
1 parent ce4beeb commit 36e8c75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,9 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
17621762
std::unique_ptr<LLVMRemarkStreamer> LlvmRemarkStreamer;
17631763

17641764
if (RemarkFilePath != nullptr) {
1765+
#if LLVM_VERSION_GE(22, 0)
1766+
report_fatal_error("optimization remark-dir unimplemented on LLVM 22 and later");
1767+
#else
17651768
if (PGOAvailable) {
17661769
// Enable PGO hotness data for remarks, if available
17671770
unwrap(C)->setDiagnosticsHotnessRequested(true);
@@ -1790,6 +1793,7 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
17901793
RemarkStreamer = std::make_unique<llvm::remarks::RemarkStreamer>(
17911794
std::move(*RemarkSerializer));
17921795
LlvmRemarkStreamer = std::make_unique<LLVMRemarkStreamer>(*RemarkStreamer);
1796+
#endif
17931797
}
17941798

17951799
unwrap(C)->setDiagnosticHandler(std::make_unique<RustDiagnosticHandler>(

0 commit comments

Comments
 (0)