Fix a couple of preprocessed host bugs

This commit is contained in:
Richard Feldman 2022-11-22 23:34:31 -05:00
parent d9f3e11634
commit c0b065b51a
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 13 additions and 22 deletions

View file

@ -134,7 +134,7 @@ pub const fn preprocessed_host_filename(target: &Triple) -> Option<&'static str>
/// Same format as the precompiled host filename, except with a file extension like ".o" or ".obj"
pub fn legacy_host_filename(target: &Triple, opt_level: OptLevel) -> Option<String> {
let os = roc_target::OperatingSystem::new(target.operating_system)?;
let os = roc_target::OperatingSystem::from(target.operating_system);
let ext = legacy_host_filename_ext(os, opt_level);
Some(preprocessed_host_filename(target)?.replace(PRECOMPILED_HOST_EXT, ext))