Skip to content

Commit 2ef90bb

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. Fixes #146912 as far as I can tell (the test passes.) @rustbot label llvm-main
1 parent ce4beeb commit 2ef90bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,9 +1779,14 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
17791779
// Do not delete the file after we gather remarks
17801780
RemarkFile->keep();
17811781

1782+
#if LLVM_VERSION_GE(22, 0)
1783+
auto RemarkSerializer = remarks::createRemarkSerializer(
1784+
llvm::remarks::Format::YAML, RemarkFile->os());
1785+
#else
17821786
auto RemarkSerializer = remarks::createRemarkSerializer(
17831787
llvm::remarks::Format::YAML, remarks::SerializerMode::Separate,
17841788
RemarkFile->os());
1789+
#endif
17851790
if (Error E = RemarkSerializer.takeError()) {
17861791
std::string Error = std::string("Cannot create remark serializer: ") +
17871792
toString(std::move(E));

0 commit comments

Comments
 (0)