mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fixes to library loading and test sources.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "../version.h"
|
||||
#include "../utils/lib.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define MAX_BUILD_LIB_DIRS 1024
|
||||
#define MAX_COMMAND_LINE_FILES 2048
|
||||
@@ -617,7 +618,7 @@ typedef struct
|
||||
} BuildTarget;
|
||||
|
||||
static const char *x86_cpu_set[8] = {
|
||||
[X86CPU_BASELINE] = "baseline",
|
||||
[X86CPU_BASELINE] = "baseline", // NOLINT
|
||||
[X86CPU_SSSE3] = "ssse3",
|
||||
[X86CPU_SSE4] = "sse4",
|
||||
[X86CPU_AVX1] = "avx1",
|
||||
|
||||
@@ -71,8 +71,7 @@ static inline void parse_library_type(Library *library, LibraryTarget ***target_
|
||||
static inline void parse_library_target(Library *library, LibraryTarget *target, const char *target_name,
|
||||
JSONObject *object)
|
||||
{
|
||||
target->link_flags = target->link_flags = get_string_array(library->dir, target_name, object, "link-args", false);
|
||||
|
||||
target->link_flags = get_string_array(library->dir, target_name, object, "link-args", false);
|
||||
if (!target->link_flags)
|
||||
{
|
||||
target->link_flags = get_string_array(library->dir, target_name, object, "linkflags", false);
|
||||
|
||||
@@ -1072,7 +1072,7 @@ void compile()
|
||||
{
|
||||
symtab_init(compiler.build.symtab_size);
|
||||
compiler.build.sources = target_expand_source_names(NULL, compiler.build.source_dirs, c3_suffix_list, 3, true);
|
||||
if (compiler.build.testing)
|
||||
if (compiler.build.testing && compiler.build.test_source_dirs)
|
||||
{
|
||||
const char **test_sources = target_expand_source_names(NULL, compiler.build.test_source_dirs, c3_suffix_list, 3, true);
|
||||
FOREACH(const char *, file, test_sources) vec_add(compiler.build.sources, file);
|
||||
|
||||
Reference in New Issue
Block a user