mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Compute src_dir from original filename
This fixed a bug where bindgen was providing cwd() for src_dir, but actually the src_dir should have been based on the filename. This prevents that problem from happening in the future!
This commit is contained in:
parent
6abf25e3a8
commit
bf63c45b46
12 changed files with 10 additions and 47 deletions
|
@ -353,8 +353,6 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
|
|||
);
|
||||
}
|
||||
|
||||
let src_dir = path.parent().unwrap().canonicalize().unwrap();
|
||||
|
||||
// let target_valgrind = matches.is_present(FLAG_VALGRIND);
|
||||
|
||||
let arena = &arena;
|
||||
|
@ -368,7 +366,6 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
|
|||
let loaded = roc_load::load_and_monomorphize(
|
||||
arena,
|
||||
path,
|
||||
src_dir,
|
||||
subs_by_module,
|
||||
target_info,
|
||||
// TODO: expose this from CLI?
|
||||
|
@ -494,12 +491,10 @@ pub fn build(
|
|||
}
|
||||
});
|
||||
|
||||
let src_dir = path.parent().unwrap().canonicalize().unwrap();
|
||||
let target_valgrind = matches.is_present(FLAG_VALGRIND);
|
||||
let res_binary_path = build_file(
|
||||
&arena,
|
||||
&triple,
|
||||
src_dir,
|
||||
path,
|
||||
opt_level,
|
||||
emit_debug_info,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue