diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index a2dfebec59441..ea5f8eaba6e9e 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1813,6 +1813,9 @@ extern "C" LLVMRustResult LLVMRustWriteImportLibrary( ImportName, Path, ConvertedExports, + #if LLVM_VERSION_GE(19, 0) + std::nullopt, + #endif static_cast(Machine), MinGW); if (Error) {