(
sess: &Session,
spv_binary: &[u32],
filename: &Path,
options: spirv_tools::val::ValidatorOptions,
)
| 354 | } |
| 355 | |
| 356 | fn do_spirv_val( |
| 357 | sess: &Session, |
| 358 | spv_binary: &[u32], |
| 359 | filename: &Path, |
| 360 | options: spirv_tools::val::ValidatorOptions, |
| 361 | ) { |
| 362 | use spirv_tools::val::{self, Validator}; |
| 363 | |
| 364 | let validator = val::create(sess.target.options.env.parse().ok()); |
| 365 | |
| 366 | if let Err(e) = validator.validate(spv_binary, Some(options)) { |
| 367 | let mut err = sess.struct_err(e.to_string()); |
| 368 | err.note("spirv-val failed"); |
| 369 | err.note(format!("module `{}`", filename.display())); |
| 370 | err.emit(); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | fn link_local_crate_native_libs_and_dependent_crate_libs( |
| 375 | rlibs: &mut Vec<PathBuf>, |
no test coverage detected