diff --git a/releasenotes.md b/releasenotes.md index 4516dfed3..564ea8ed2 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -153,6 +153,7 @@ - Added posix socket functions. ### Fixes +- Fix to bug where library source files were sometimes ignored. - Types of arrays and vectors are consistently checked to be valid. - Anonymous bitstructs check of duplicate member names fixed. - Assignment to anonymous bitstruct members in structs. diff --git a/src/compiler/compiler.c b/src/compiler/compiler.c index 3716ef561..8d759d1c4 100644 --- a/src/compiler/compiler.c +++ b/src/compiler/compiler.c @@ -825,12 +825,12 @@ void compile() static const char* c_suffix_list[3] = { ".c" }; active_target.csources = target_expand_source_names(active_target.csource_dirs, c_suffix_list, 1, false); } - global_context.sources = active_target.sources; global_context.main = NULL; global_context.string_type = NULL; asm_target.initialized = false; target_setup(&active_target); resolve_libraries(); + global_context.sources = active_target.sources; TokenType type = TOKEN_CONST_IDENT; FOREACH_BEGIN(const char *feature_flag, active_target.feature_list) diff --git a/src/compiler/compiler_internal.h b/src/compiler/compiler_internal.h index 13f6ebcea..4a03ab074 100644 --- a/src/compiler/compiler_internal.h +++ b/src/compiler/compiler_internal.h @@ -1585,8 +1585,8 @@ typedef struct struct CompilationUnit_ { Module *module; - File* file; - Decl** imports; + File *file; + Decl **imports; Decl **types; Decl **functions; Decl **lambdas; diff --git a/src/utils/file_utils.c b/src/utils/file_utils.c index 6bf092e0d..9d6431c6b 100644 --- a/src/utils/file_utils.c +++ b/src/utils/file_utils.c @@ -554,7 +554,7 @@ void file_add_wildcard_files(const char ***files, const char *path, bool recursi continue; } char *format = path_ends_with_slash ? "%s%s" : "%s/%s"; - DEBUG_LOG("Added file"); + DEBUG_LOG("Added file %s", ent->d_name); vec_add(*files, str_printf(format, path, ent->d_name)); } closedir(dir); diff --git a/src/version.h b/src/version.h index c896a6488..fbe02ff0f 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "0.4.600" \ No newline at end of file +#define COMPILER_VERSION "0.4.601" \ No newline at end of file