From 9c49662a24e2377185e3f7d72a463e704af3e71c Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sun, 25 Oct 2020 01:15:05 -0400 Subject: [PATCH] Use LinkType::Executable for normal builds --- cli/src/build.rs | 4 ++-- cli/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/src/build.rs b/cli/src/build.rs index f851a62abf..9f854694c0 100644 --- a/cli/src/build.rs +++ b/cli/src/build.rs @@ -24,6 +24,7 @@ pub fn build_file( src_dir: PathBuf, roc_file_path: PathBuf, opt_level: OptLevel, + link_type: LinkType, ) -> Result { let compilation_start = SystemTime::now(); let arena = Bump::new(); @@ -104,8 +105,7 @@ pub fn build_file( target, binary_path, &[host_input_path.as_path().to_str().unwrap(), app_o_file.as_path().to_str().unwrap()], - // LinkType::Executable, - LinkType::Dylib, + link_type ) .map_err(|_| { todo!("gracefully handle `rustc` failing to spawn."); diff --git a/cli/src/lib.rs b/cli/src/lib.rs index e821a13017..e21605045e 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -3,6 +3,7 @@ extern crate clap; use clap::ArgMatches; use clap::{App, Arg}; +use roc_build::link::LinkType; use roc_gen::llvm::build::OptLevel; use std::io; use std::path::Path; @@ -91,7 +92,7 @@ pub fn build(target: &Triple, matches: &ArgMatches, run_after_build: bool) -> io } }); - let binary_path = build::build_file(target, src_dir, path, opt_level) + let binary_path = build::build_file(target, src_dir, path, opt_level, LinkType::Executable) .expect("TODO gracefully handle build_file failing"); if run_after_build {