--path is now properly respected.

This commit is contained in:
Christoffer Lerno
2024-08-25 18:15:33 +02:00
parent 734e0f350a
commit 8fde7cd6f5
3 changed files with 7 additions and 3 deletions

View File

@@ -84,6 +84,7 @@
- Fix aligned alloc for Win32 targets.
- Compiler didn't detect when a module name was used both as a generic and regular module.
- Assigning a const zero to an aliased distinct caused an error.
- `--path` is now properly respected.
### Stdlib changes

View File

@@ -32,6 +32,12 @@ const char* c3_suffix_list[3] = { ".c3", ".c3t", ".c3i" };
void compiler_init(BuildOptions *build_options)
{
// Process --path
if (build_options->path && !dir_change(build_options->path))
{
error_exit("Failed to change path to '%s'.", build_options->path);
}
compiler_init_time = -1;
compiler_parsing_time = -1;
compiler_sema_time = -1;

View File

@@ -373,13 +373,10 @@ const char *find_rel_exe_dir(const char *dir)
return scratch_buffer_to_string();
}
return NULL;
}
const char *find_lib_dir(void)
{
char *path = find_executable_path();
INFO_LOG("Detected executable path at %s", path);