diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/br.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/br.rs b/src/bin/br.rs index 77bf3ee..632291c 100644 --- a/src/bin/br.rs +++ b/src/bin/br.rs @@ -170,7 +170,11 @@ fn main_asm(args: Asm) { // ----------------------------------------------------------------------- // RESOLVE syntactic symbols let ext = args.ext.unwrap_or(String::from("brc")); - let mut resolver = if let Some(path) = &args.source { + let source_path = args.source.clone().map(|p| { + p.canonicalize().unwrap_or(p) + }); + + let mut resolver = if let Some(path) = &source_path { match SourceUnit::from_path(&path, &ext) { Ok(source_unit) => SymbolResolver::from_source_unit(source_unit), Err(err) => match err { @@ -201,7 +205,7 @@ fn main_asm(args: Asm) { SymbolResolver::from_source_unit(source_unit) }; // Load project libraries. - if let Some(path) = &args.source { + if let Some(path) = &source_path { if !args.no_libs && !args.no_project_libs { let project_library = gather_project_libraries(path, &ext); resolver.add_library_units(project_library); |