mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve linker error message (#2880)
* Improve linker error message * use file_util/file_is_dir instead * cleanup unused function * Some minor updates and merging latest master. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
### Stdlib changes
|
||||
|
||||
### Fixes
|
||||
- Add error message if directory with output file name already exists
|
||||
|
||||
## 0.7.9 Change list
|
||||
|
||||
|
||||
@@ -1051,6 +1051,11 @@ void platform_linker(const char *output_file, const char **files, unsigned file_
|
||||
vec_add(parts, compiler.build.cc ? compiler.build.cc : default_c_compiler());
|
||||
}
|
||||
|
||||
if (file_is_dir(output_file))
|
||||
{
|
||||
error_exit("Failed to link executable '%s', a directory with that name already exists.", output_file);
|
||||
}
|
||||
|
||||
linker_setup(&parts, files, file_count, output_file, linker_type, &compiler.linking);
|
||||
const char *output = assemble_linker_command(parts, PLATFORM_WINDOWS);
|
||||
if (compiler.build.print_linking) puts(output);
|
||||
|
||||
Reference in New Issue
Block a user