diff --git a/crates/mun_compiler/src/driver.rs b/crates/mun_compiler/src/driver.rs index d464a9fd8..d38f4f5fc 100644 --- a/crates/mun_compiler/src/driver.rs +++ b/crates/mun_compiler/src/driver.rs @@ -8,7 +8,6 @@ use crate::{ }; use mun_codegen::IrDatabase; use mun_hir::{FileId, RelativePathBuf, SourceDatabase, SourceRoot, SourceRootId}; -use mun_target::spec::Target; use std::{ path::{Path, PathBuf}, sync::Arc, @@ -126,19 +125,11 @@ impl Driver { impl Driver { /// Computes the output path for the assembly of the specified file. fn assembly_output_path(&self, file_id: FileId) -> PathBuf { - let target: Target = self.db.target(); let relative_path: RelativePathBuf = self.db.file_relative_path(file_id); let original_filename = Path::new(relative_path.file_name().unwrap()); - // Get the dll suffix without the starting dot - let dll_extension = if target.options.dll_suffix.starts_with('.') { - &target.options.dll_suffix[1..] - } else { - &target.options.dll_suffix - }; - - // Add the dll suffix to the original filename - let output_file_name = original_filename.with_extension(dll_extension); + // Add the `munlib` suffix to the original filename + let output_file_name = original_filename.with_extension("munlib"); // If there is an out dir specified, prepend the output directory if let Some(ref out_dir) = self.out_dir { diff --git a/crates/mun_target/src/spec.rs b/crates/mun_target/src/spec.rs index b38c20353..54081577a 100644 --- a/crates/mun_target/src/spec.rs +++ b/crates/mun_target/src/spec.rs @@ -52,9 +52,6 @@ pub struct TargetOptions { /// String to prepend to the name of every dynamic library. Defaults to "lib". pub dll_prefix: String, - /// String to append to the name of every dynamic library. Defaults to ".so". - pub dll_suffix: String, - /// Whether the target toolchain is like Windows pub is_like_windows: bool, } @@ -66,7 +63,6 @@ impl Default for TargetOptions { cpu: "generic".to_string(), features: "".to_string(), dll_prefix: "lib".to_string(), - dll_suffix: ".so".to_string(), is_like_windows: false, } } diff --git a/crates/mun_target/src/spec/apple_base.rs b/crates/mun_target/src/spec/apple_base.rs index 423a24be9..27b944ab3 100644 --- a/crates/mun_target/src/spec/apple_base.rs +++ b/crates/mun_target/src/spec/apple_base.rs @@ -4,7 +4,6 @@ use std::env; pub fn opts() -> TargetOptions { TargetOptions { dll_prefix: "lib".to_string(), - dll_suffix: ".dylib".to_string(), ..Default::default() } } diff --git a/crates/mun_target/src/spec/windows_msvc_base.rs b/crates/mun_target/src/spec/windows_msvc_base.rs index dd94e63a1..a20e2db21 100644 --- a/crates/mun_target/src/spec/windows_msvc_base.rs +++ b/crates/mun_target/src/spec/windows_msvc_base.rs @@ -3,7 +3,6 @@ use crate::spec::TargetOptions; pub fn opts() -> TargetOptions { TargetOptions { dll_prefix: "".to_string(), - dll_suffix: ".dll".to_string(), is_like_windows: true, ..Default::default() }