You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let log = prog.compiler_log().unwrap().unwrap_or_default();
119
-
let footer = "If you plan to submit a bug report please re-run the codegen with `RUSTFLAGS=\"--emit=llvm-ir\" and include the .ll file corresponding to the .o file mentioned in the log";
120
-
panic!(
121
-
"Malformed NVVM IR program rejected by libnvvm, dumping verifier log:\n\n{log}\n\n{footer}"
122
-
);
142
+
#[cfg(feature = "llvm19")]
143
+
if target_arch.uses_modern_ir_dialect() && is_known_nvvm_verify_false_negative(&log){
144
+
sess.dcx().warn(
145
+
"libnvvm verification rejected LLVM 19 bitcode with the known legacy-reader message; proceeding to compilation anyway on the llvm19 path"
146
+
);
147
+
}else{
148
+
let footer = "If you plan to submit a bug report please re-run the codegen with `RUSTFLAGS=\"--emit=llvm-ir\" and include the .ll file corresponding to the .o file mentioned in the log";
149
+
panic!(
150
+
"Malformed NVVM IR program rejected by libnvvm, dumping verifier log:\n\n{log}\n\n{footer}"
151
+
);
152
+
}
153
+
#[cfg(not(feature = "llvm19"))]
154
+
{
155
+
let footer = "If you plan to submit a bug report please re-run the codegen with `RUSTFLAGS=\"--emit=llvm-ir\" and include the .ll file corresponding to the .o file mentioned in the log";
156
+
panic!(
157
+
"Malformed NVVM IR program rejected by libnvvm, dumping verifier log:\n\n{log}\n\n{footer}"
158
+
);
159
+
}
123
160
}
124
161
125
162
let res = match prog.compile(&args.nvvm_options){
126
163
Ok(b) => b,
127
164
Err(error) => {
128
165
let log = prog.compiler_log().unwrap().unwrap_or_default();
129
-
// this should never happen, if it does, something went really bad or its a bug on libnvvm's end
130
166
panic!(
131
-
"libnvvm returned an error that was not previously caught by the verifier: {error:?}{log:?}"
0 commit comments