mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Set link type based on --lib flag
This commit is contained in:
parent
cdc32aadd2
commit
9fcd339af9
2 changed files with 11 additions and 3 deletions
|
@ -145,6 +145,12 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
|
|||
};
|
||||
let emit_debug_info = matches.is_present(FLAG_DEBUG);
|
||||
|
||||
let link_type = if matches.is_present(FLAG_LIB) {
|
||||
LinkType::Dylib
|
||||
} else {
|
||||
LinkType::Executable
|
||||
};
|
||||
|
||||
let path = Path::new(filename).canonicalize().unwrap();
|
||||
let src_dir = path.parent().unwrap().canonicalize().unwrap();
|
||||
|
||||
|
@ -174,7 +180,7 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
|
|||
path,
|
||||
opt_level,
|
||||
emit_debug_info,
|
||||
LinkType::Executable,
|
||||
link_type,
|
||||
);
|
||||
|
||||
match res_binary_path {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue