aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/all_types.hpp2
-rw-r--r--src/ast_render.cpp3
-rw-r--r--src/buffer.hpp10
-rw-r--r--src/codegen.cpp42
-rw-r--r--src/codegen.hpp2
-rw-r--r--src/config.h.in2
-rw-r--r--src/install_files.h1802
-rw-r--r--src/ir.cpp4
-rw-r--r--src/link.cpp1024
-rw-r--r--src/main.cpp11
-rw-r--r--src/target.cpp37
-rw-r--r--src/target.hpp3
-rw-r--r--src/translate_c.cpp44
-rw-r--r--src/util.hpp10
-rw-r--r--src/zig_clang.cpp161
-rw-r--r--src/zig_clang.h79
16 files changed, 3143 insertions, 93 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp
index b49ed9820b..3cdaf36cd9 100644
--- a/src/all_types.hpp
+++ b/src/all_types.hpp
@@ -1804,7 +1804,7 @@ struct CodeGen {
ZigType *err_tag_type;
ZigType *test_fn_type;
- Buf triple_str;
+ Buf llvm_triple_str;
Buf global_asm;
Buf output_file_path;
Buf o_file_output_path;
diff --git a/src/ast_render.cpp b/src/ast_render.cpp
index 6ea6dc4eff..154803f884 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -444,9 +444,8 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
const char *extern_str = extern_string(node->data.fn_proto.is_extern);
const char *export_str = export_string(node->data.fn_proto.is_export);
const char *inline_str = inline_string(node->data.fn_proto.is_inline);
- fprintf(ar->f, "%s%s%s%sfn", pub_str, inline_str, export_str, extern_str);
+ fprintf(ar->f, "%s%s%s%sfn ", pub_str, inline_str, export_str, extern_str);
if (node->data.fn_proto.name != nullptr) {
- fprintf(ar->f, " ");
print_symbol(ar, node->data.fn_proto.name);
}
fprintf(ar->f, "(");
diff --git a/src/buffer.hpp b/src/buffer.hpp
index d4a911fc21..d7254c18a7 100644
--- a/src/buffer.hpp
+++ b/src/buffer.hpp
@@ -136,11 +136,21 @@ static inline bool buf_eql_mem(Buf *buf, const char *mem, size_t mem_len) {
return mem_eql_mem(buf_ptr(buf), buf_len(buf), mem, mem_len);
}
+static inline bool buf_eql_mem_ignore_case(Buf *buf, const char *mem, size_t mem_len) {
+ assert(buf->list.length);
+ return mem_eql_mem_ignore_case(buf_ptr(buf), buf_len(buf), mem, mem_len);
+}
+
static inline bool buf_eql_str(Buf *buf, const char *str) {
assert(buf->list.length);
return buf_eql_mem(buf, str, strlen(str));
}
+static inline bool buf_eql_str_ignore_case(Buf *buf, const char *str) {
+ assert(buf->list.length);
+ return buf_eql_mem_ignore_case(buf, str, strlen(str));
+}
+
static inline bool buf_starts_with_mem(Buf *buf, const char *mem, size_t mem_len) {
if (buf_len(buf) < mem_len) {
return false;
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 59d3e1f4a0..234b28219b 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -199,7 +199,7 @@ CodeGen *codegen_create(Buf *main_pkg_path, Buf *root_src_path, const ZigTarget
g->link_libs_list.append(g->libc_link_lib);
}
- get_target_triple(&g->triple_str, g->zig_target);
+ target_triple_llvm(&g->llvm_triple_str, g->zig_target);
g->pointer_size_bytes = target_arch_pointer_bit_width(g->zig_target->arch) / 8;
if (!target_has_debug_info(g->zig_target)) {
@@ -3837,7 +3837,7 @@ static LLVMValueRef ir_render_call(CodeGen *g, IrExecutable *executable, IrInstr
return result_loc;
} else if (handle_is_ptr(src_return_type)) {
LLVMValueRef store_instr = LLVMBuildStore(g->builder, result, result_loc);
- LLVMSetAlignment(store_instr, LLVMGetAlignment(result_loc));
+ LLVMSetAlignment(store_instr, get_ptr_align(g, instruction->result_loc->value.type));
return result_loc;
} else {
return result;
@@ -8103,7 +8103,7 @@ static void init(CodeGen *g) {
assert(g->root_out_name);
g->module = LLVMModuleCreateWithName(buf_ptr(g->root_out_name));
- LLVMSetTarget(g->module, buf_ptr(&g->triple_str));
+ LLVMSetTarget(g->module, buf_ptr(&g->llvm_triple_str));
if (target_object_format(g->zig_target) == ZigLLVM_COFF) {
ZigLLVMAddModuleCodeViewFlag(g->module);
@@ -8113,13 +8113,13 @@ static void init(CodeGen *g) {
LLVMTargetRef target_ref;
char *err_msg = nullptr;
- if (LLVMGetTargetFromTriple(buf_ptr(&g->triple_str), &target_ref, &err_msg)) {
+ if (LLVMGetTargetFromTriple(buf_ptr(&g->llvm_triple_str), &target_ref, &err_msg)) {
fprintf(stderr,
"Zig is expecting LLVM to understand this target: '%s'\n"
"However LLVM responded with: \"%s\"\n"
"Zig is unable to continue. This is a bug in Zig:\n"
"https://github.com/ziglang/zig/issues/438\n"
- , buf_ptr(&g->triple_str), err_msg);
+ , buf_ptr(&g->llvm_triple_str), err_msg);
exit(1);
}
@@ -8153,7 +8153,7 @@ static void init(CodeGen *g) {
target_specific_features = "";
}
- g->target_machine = ZigLLVMCreateTargetMachine(target_ref, buf_ptr(&g->triple_str),
+ g->target_machine = ZigLLVMCreateTargetMachine(target_ref, buf_ptr(&g->llvm_triple_str),
target_specific_cpu_args, target_specific_features, opt_level, reloc_mode,
LLVMCodeModelDefault, g->function_sections);
@@ -8333,12 +8333,12 @@ static void detect_libc(CodeGen *g) {
!target_os_is_darwin(g->zig_target->os))
{
Buf triple_buf = BUF_INIT;
- get_target_triple(&triple_buf, g->zig_target);
+ target_triple_zig(&triple_buf, g->zig_target);
fprintf(stderr,
"Zig is unable to provide a libc for the chosen target '%s'.\n"
"The target is non-native, so Zig also cannot use the native libc installation.\n"
- "Choose a target which has a libc available, or provide a libc installation text file.\n"
- "See `zig libc --help` for more details.\n", buf_ptr(&triple_buf));
+ "Choose a target which has a libc available (see `zig targets`), or\n"
+ "provide a libc installation text file (see `zig libc --help`).\n", buf_ptr(&triple_buf));
exit(1);
}
}
@@ -8397,12 +8397,18 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa
args.append("-march=native");
} else {
args.append("-target");
- args.append(buf_ptr(&g->triple_str));
+ args.append(buf_ptr(&g->llvm_triple_str));
}
if (g->zig_target->os == OsFreestanding) {
args.append("-ffreestanding");
}
+ // windows.h has files such as pshpack1.h which do #pragma packing, triggering a clang warning.
+ // So for this target, we disable this warning.
+ if (g->zig_target->os == OsWindows && target_abi_is_gnu(g->zig_target->abi)) {
+ args.append("-Wno-pragma-pack");
+ }
+
if (!g->strip_debug_symbols) {
args.append("-g");
}
@@ -8735,10 +8741,10 @@ static void gen_root_source(CodeGen *g) {
}
-static void print_zig_cc_cmd(const char *zig_exe, ZigList<const char *> *args) {
- fprintf(stderr, "%s", zig_exe);
+static void print_zig_cc_cmd(ZigList<const char *> *args) {
for (size_t arg_i = 0; arg_i < args->length; arg_i += 1) {
- fprintf(stderr, " %s", args->at(arg_i));
+ const char *space_str = (arg_i == 0) ? "" : " ";
+ fprintf(stderr, "%s%s", space_str, args->at(arg_i));
}
fprintf(stderr, "\n");
}
@@ -8876,12 +8882,12 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
}
if (g->verbose_cc) {
- print_zig_cc_cmd("zig", &args);
+ print_zig_cc_cmd(&args);
}
os_spawn_process(args, &term);
if (term.how != TerminationIdClean || term.code != 0) {
fprintf(stderr, "\nThe following command failed:\n");
- print_zig_cc_cmd(buf_ptr(self_exe_path), &args);
+ print_zig_cc_cmd(&args);
exit(1);
}
@@ -9698,10 +9704,14 @@ void codegen_build_and_link(CodeGen *g) {
}
}
+ codegen_release_caches(g);
+ codegen_add_time_event(g, "Done");
+}
+
+void codegen_release_caches(CodeGen *g) {
while (g->caches_to_release.length != 0) {
cache_release(g->caches_to_release.pop());
}
- codegen_add_time_event(g, "Done");
}
ZigPackage *codegen_create_package(CodeGen *g, const char *root_src_dir, const char *root_src_path,
diff --git a/src/codegen.hpp b/src/codegen.hpp
index d7cabe879e..5de36c1aab 100644
--- a/src/codegen.hpp
+++ b/src/codegen.hpp
@@ -61,4 +61,6 @@ Buf *codegen_generate_builtin_source(CodeGen *g);
TargetSubsystem detect_subsystem(CodeGen *g);
+void codegen_release_caches(CodeGen *codegen);
+
#endif
diff --git a/src/config.h.in b/src/config.h.in
index 93e31ad9b7..a99aab0d72 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -23,7 +23,5 @@
#define ZIG_LLD_LIBRARIES "@LLD_LIBRARIES@"
#define ZIG_LLVM_CONFIG_EXE "@LLVM_CONFIG_EXE@"
#define ZIG_DIA_GUIDS_LIB "@ZIG_DIA_GUIDS_LIB_ESCAPED@"
-#define ZIG_STD_FILES "@ZIG_STD_FILES@"
-#define ZIG_C_HEADER_FILES "@ZIG_C_HEADER_FILES@"
#endif
diff --git a/src/install_files.h b/src/install_files.h
new file mode 100644
index 0000000000..8b6a4dc059
--- /dev/null
+++ b/src/install_files.h
@@ -0,0 +1,1802 @@
+#ifndef ZIG_INSTALL_FILES_H
+#define ZIG_INSTALL_FILES_H
+static const char *ZIG_MUSL_SRC_FILES[] = {
+"musl/src/aio/aio.c",
+"musl/src/aio/aio_suspend.c",
+"musl/src/aio/lio_listio.c",
+"musl/src/complex/__cexp.c",
+"musl/src/complex/__cexpf.c",
+"musl/src/complex/cabs.c",
+"musl/src/complex/cabsf.c",
+"musl/src/complex/cabsl.c",
+"musl/src/complex/cacos.c",
+"musl/src/complex/cacosf.c",
+"musl/src/complex/cacosh.c",
+"musl/src/complex/cacoshf.c",
+"musl/src/complex/cacoshl.c",
+"musl/src/complex/cacosl.c",
+"musl/src/complex/carg.c",
+"musl/src/complex/cargf.c",
+"musl/src/complex/cargl.c",
+"musl/src/complex/casin.c",
+"musl/src/complex/casinf.c",
+"musl/src/complex/casinh.c",
+"musl/src/complex/casinhf.c",
+"musl/src/complex/casinhl.c",
+"musl/src/complex/casinl.c",
+"musl/src/complex/catan.c",
+"musl/src/complex/catanf.c",
+"musl/src/complex/catanh.c",
+"musl/src/complex/catanhf.c",
+"musl/src/complex/catanhl.c",
+"musl/src/complex/catanl.c",
+"musl/src/complex/ccos.c",
+"musl/src/complex/ccosf.c",
+"musl/src/complex/ccosh.c",
+"musl/src/complex/ccoshf.c",
+"musl/src/complex/ccoshl.c",
+"musl/src/complex/ccosl.c",
+"musl/src/complex/cexp.c",
+"musl/src/complex/cexpf.c",
+"musl/src/complex/cexpl.c",
+"musl/src/complex/cimag.c",
+"musl/src/complex/cimagf.c",
+"musl/src/complex/cimagl.c",
+"musl/src/complex/clog.c",
+"musl/src/complex/clogf.c",
+"musl/src/complex/clogl.c",
+"musl/src/complex/conj.c",
+"musl/src/complex/conjf.c",
+"musl/src/complex/conjl.c",
+"musl/src/complex/cpow.c",
+"musl/src/complex/cpowf.c",
+"musl/src/complex/cpowl.c",
+"musl/src/complex/cproj.c",
+"musl/src/complex/cprojf.c",
+"musl/src/complex/cprojl.c",
+"musl/src/complex/creal.c",
+"musl/src/complex/crealf.c",
+"musl/src/complex/creall.c",
+"musl/src/complex/csin.c",
+"musl/src/complex/csinf.c",
+"musl/src/complex/csinh.c",
+"musl/src/complex/csinhf.c",
+"musl/src/complex/csinhl.c",
+"musl/src/complex/csinl.c",
+"musl/src/complex/csqrt.c",
+"musl/src/complex/csqrtf.c",
+"musl/src/complex/csqrtl.c",
+"musl/src/complex/ctan.c",
+"musl/src/complex/ctanf.c",
+"musl/src/complex/ctanh.c",
+"musl/src/complex/ctanhf.c",
+"musl/src/complex/ctanhl.c",
+"musl/src/complex/ctanl.c",
+"musl/src/conf/confstr.c",
+"musl/src/conf/fpathconf.c",
+"musl/src/conf/legacy.c",
+"musl/src/conf/pathconf.c",
+"musl/src/conf/sysconf.c",
+"musl/src/crypt/crypt.c",
+"musl/src/crypt/crypt_blowfish.c",
+"musl/src/crypt/crypt_des.c",
+"musl/src/crypt/crypt_des.h",
+"musl/src/crypt/crypt_md5.c",
+"musl/src/crypt/crypt_r.c",
+"musl/src/crypt/crypt_sha256.c",
+"musl/src/crypt/crypt_sha512.c",
+"musl/src/crypt/encrypt.c",
+"musl/src/ctype/__ctype_b_loc.c",
+"musl/src/ctype/__ctype_get_mb_cur_max.c",
+"musl/src/ctype/__ctype_tolower_loc.c",
+"musl/src/ctype/__ctype_toupper_loc.c",
+"musl/src/ctype/alpha.h",
+"musl/src/ctype/isalnum.c",
+"musl/src/ctype/isalpha.c",
+"musl/src/ctype/isascii.c",
+"musl/src/ctype/isblank.c",
+"musl/src/ctype/iscntrl.c",
+"musl/src/ctype/isdigit.c",
+"musl/src/ctype/isgraph.c",
+"musl/src/ctype/islower.c",
+"musl/src/ctype/isprint.c",
+"musl/src/ctype/ispunct.c",
+"musl/src/ctype/isspace.c",
+"musl/src/ctype/isupper.c",
+"musl/src/ctype/iswalnum.c",
+"musl/src/ctype/iswalpha.c",
+"musl/src/ctype/iswblank.c",
+"musl/src/ctype/iswcntrl.c",
+"musl/src/ctype/iswctype.c",
+"musl/src/ctype/iswdigit.c",
+"musl/src/ctype/iswgraph.c",
+"musl/src/ctype/iswlower.c",
+"musl/src/ctype/iswprint.c",
+"musl/src/ctype/iswpunct.c",
+"musl/src/ctype/iswspace.c",
+"musl/src/ctype/iswupper.c",
+"musl/src/ctype/iswxdigit.c",
+"musl/src/ctype/isxdigit.c",
+"musl/src/ctype/nonspacing.h",
+"musl/src/ctype/punct.h",
+"musl/src/ctype/toascii.c",
+"musl/src/ctype/tolower.c",
+"musl/src/ctype/toupper.c",
+"musl/src/ctype/towctrans.c",
+"musl/src/ctype/wcswidth.c",
+"musl/src/ctype/wctrans.c",
+"musl/src/ctype/wcwidth.c",
+"musl/src/ctype/wide.h",
+"musl/src/dirent/__dirent.h",
+"musl/src/dirent/alphasort.c",
+"musl/src/dirent/closedir.c",
+"musl/src/dirent/dirfd.c",
+"musl/src/dirent/fdopendir.c",
+"musl/src/dirent/opendir.c",
+"musl/src/dirent/readdir.c",
+"musl/src/dirent/readdir_r.c",
+"musl/src/dirent/rewinddir.c",
+"musl/src/dirent/scandir.c",
+"musl/src/dirent/seekdir.c",
+"musl/src/dirent/telldir.c",
+"musl/src/dirent/versionsort.c",
+"musl/src/env/__environ.c",
+"musl/src/env/__init_tls.c",
+"musl/src/env/__libc_start_main.c",
+"musl/src/env/__reset_tls.c",
+"musl/src/env/__stack_chk_fail.c",
+"musl/src/env/clearenv.c",
+"musl/src/env/getenv.c",
+"musl/src/env/putenv.c",
+"musl/src/env/setenv.c",
+"musl/src/env/unsetenv.c",
+"musl/src/errno/__errno_location.c",
+"musl/src/errno/__strerror.h",
+"musl/src/errno/strerror.c",
+"musl/src/exit/_Exit.c",
+"musl/src/exit/abort.c",
+"musl/src/exit/arm/__aeabi_atexit.c",
+"musl/src/exit/assert.c",
+"musl/src/exit/at_quick_exit.c",
+"musl/src/exit/atexit.c",
+"musl/src/exit/exit.c",
+"musl/src/exit/quick_exit.c",
+"musl/src/fcntl/creat.c",
+"musl/src/fcntl/fcntl.c",
+"musl/src/fcntl/open.c",
+"musl/src/fcntl/openat.c",
+"musl/src/fcntl/posix_fadvise.c",
+"musl/src/fcntl/posix_fallocate.c",
+"musl/src/fenv/__flt_rounds.c",
+"musl/src/fenv/aarch64/fenv.s",
+"musl/src/fenv/arm/fenv-hf.S",
+"musl/src/fenv/arm/fenv.c",
+"musl/src/fenv/fegetexceptflag.c",
+"musl/src/fenv/feholdexcept.c",
+"musl/src/fenv/fenv.c",
+"musl/src/fenv/fesetexceptflag.c",
+"musl/src/fenv/fesetround.c",
+"musl/src/fenv/feupdateenv.c",
+"musl/src/fenv/i386/fenv.s",
+"musl/src/fenv/m68k/fenv.c",
+"musl/src/fenv/mips/fenv-sf.c",
+"musl/src/fenv/mips/fenv.S",
+"musl/src/fenv/mips64/fenv-sf.c",
+"musl/src/fenv/mips64/fenv.S",
+"musl/src/fenv/mipsn32/fenv-sf.c",
+"musl/src/fenv/mipsn32/fenv.S",
+"musl/src/fenv/powerpc/fenv-sf.c",
+"musl/src/fenv/powerpc/fenv.S",
+"musl/src/fenv/powerpc64/fenv.c",
+"musl/src/fenv/s390x/fenv.c",
+"musl/src/fenv/sh/fenv-nofpu.c",
+"musl/src/fenv/sh/fenv.S",
+"musl/src/fenv/x32/fenv.s",
+"musl/src/fenv/x86_64/fenv.s",
+"musl/src/include/arpa/inet.h",
+"musl/src/include/crypt.h",
+"musl/src/include/errno.h",
+"musl/src/include/features.h",
+"musl/src/include/langinfo.h",
+"musl/src/include/pthread.h",
+"musl/src/include/resolv.h",
+"musl/src/include/signal.h",
+"musl/src/include/stdio.h",
+"musl/src/include/stdlib.h",
+"musl/src/include/string.h",
+"musl/src/include/sys/auxv.h",
+"musl/src/include/sys/mman.h",
+"musl/src/include/sys/sysinfo.h",
+"musl/src/include/sys/time.h",
+"musl/src/include/time.h",
+"musl/src/include/unistd.h",
+"musl/src/internal/aarch64/syscall.s",
+"musl/src/internal/arm/syscall.s",
+"musl/src/internal/atomic.h",
+"musl/src/internal/dynlink.h",
+"musl/src/internal/fdpic_crt.h",
+"musl/src/internal/floatscan.c",
+"musl/src/internal/floatscan.h",
+"musl/src/internal/futex.h",
+"musl/src/internal/i386/syscall.s",
+"musl/src/internal/intscan.c",
+"musl/src/internal/intscan.h",
+"musl/src/internal/ksigaction.h",
+"musl/src/internal/libc.c",
+"musl/src/internal/libc.h",
+"musl/src/internal/libm.h",
+"musl/src/internal/locale_impl.h",
+"musl/src/internal/lock.h",
+"musl/src/internal/m68k/syscall.s",
+"musl/src/internal/malloc_impl.h",
+"musl/src/internal/microblaze/syscall.s",
+"musl/src/internal/mips/syscall.s",
+"musl/src/internal/mips64/syscall.s",
+"musl/src/internal/mipsn32/syscall.s",
+"musl/src/internal/or1k/syscall.s",
+"musl/src/internal/powerpc/syscall.s",
+"musl/src/internal/powerpc64/syscall.s",
+"musl/src/internal/procfdname.c",
+"musl/src/internal/pthread_impl.h",
+"musl/src/internal/s390x/syscall.s",
+"musl/src/internal/sh/__shcall.c",
+"musl/src/internal/sh/syscall.s",
+"musl/src/internal/shgetc.c",
+"musl/src/internal/shgetc.h",
+"musl/src/internal/stdio_impl.h",
+"musl/src/internal/syscall.c",
+"musl/src/internal/syscall.h",
+"musl/src/internal/syscall_ret.c",
+"musl/src/internal/vdso.c",
+"musl/src/internal/version.c",
+"musl/src/internal/version.h",
+"musl/src/internal/x32/syscall.s",
+"musl/src/internal/x86_64/syscall.s",
+"musl/src/ipc/ftok.c",
+"musl/src/ipc/ipc.h",
+"musl/src/ipc/msgctl.c",
+"musl/src/ipc/msgget.c",
+"musl/src/ipc/msgrcv.c",
+"musl/src/ipc/msgsnd.c",
+"musl/src/ipc/semctl.c",
+"musl/src/ipc/semget.c",
+"musl/src/ipc/semop.c",
+"musl/src/ipc/semtimedop.c",
+"musl/src/ipc/shmat.c",
+"musl/src/ipc/shmctl.c",
+"musl/src/ipc/shmdt.c",
+"musl/src/ipc/shmget.c",
+"musl/src/ldso/__dlsym.c",
+"musl/src/ldso/aarch64/dlsym.s",
+"musl/src/ldso/aarch64/tlsdesc.s",
+"musl/src/ldso/arm/dlsym.s",
+"musl/src/ldso/arm/find_exidx.c",
+"musl/src/ldso/arm/tlsdesc.S",
+"musl/src/ldso/dl_iterate_phdr.c",
+"musl/src/ldso/dladdr.c",
+"musl/src/ldso/dlclose.c",
+"musl/src/ldso/dlerror.c",
+"musl/src/ldso/dlinfo.c",
+"musl/src/ldso/dlopen.c",
+"musl/src/ldso/dlsym.c",
+"musl/src/ldso/i386/dlsym.s",
+"musl/src/ldso/i386/tlsdesc.s",
+"musl/src/ldso/m68k/dlsym.s",
+"musl/src/ldso/microblaze/dlsym.s",
+"musl/src/ldso/mips/dlsym.s",
+"musl/src/ldso/mips64/dlsym.s",
+"musl/src/ldso/mipsn32/dlsym.s",
+"musl/src/ldso/or1k/dlsym.s",
+"musl/src/ldso/powerpc/dlsym.s",
+"musl/src/ldso/powerpc64/dlsym.s",
+"musl/src/ldso/s390x/dlsym.s",
+"musl/src/ldso/sh/dlsym.s",
+"musl/src/ldso/tlsdesc.c",
+"musl/src/ldso/x32/dlsym.s",
+"musl/src/ldso/x86_64/dlsym.s",
+"musl/src/ldso/x86_64/tlsdesc.s",
+"musl/src/legacy/cuserid.c",
+"musl/src/legacy/daemon.c",
+"musl/src/legacy/err.c",
+"musl/src/legacy/euidaccess.c",
+"musl/src/legacy/ftw.c",
+"musl/src/legacy/futimes.c",
+"musl/src/legacy/getdtablesize.c",
+"musl/src/legacy/getloadavg.c",
+"musl/src/legacy/getpagesize.c",
+"musl/src/legacy/getpass.c",
+"musl/src/legacy/getusershell.c",
+"musl/src/legacy/isastream.c",
+"musl/src/legacy/lutimes.c",
+"musl/src/legacy/ulimit.c",
+"musl/src/legacy/utmpx.c",
+"musl/src/legacy/valloc.c",
+"musl/src/linux/adjtime.c",
+"musl/src/linux/adjtimex.c",
+"musl/src/linux/arch_prctl.c",
+"musl/src/linux/brk.c",
+"musl/src/linux/cache.c",
+"musl/src/linux/cap.c",
+"musl/src/linux/chroot.c",
+"musl/src/linux/clock_adjtime.c",
+"musl/src/linux/clone.c",
+"musl/src/linux/epoll.c",
+"musl/src/linux/eventfd.c",
+"musl/src/linux/fallocate.c",
+"musl/src/linux/fanotify.c",
+"musl/src/linux/flock.c",
+"musl/src/linux/getdents.c",
+"musl/src/linux/getrandom.c",
+"musl/src/linux/inotify.c",
+"musl/src/linux/ioperm.c",
+"musl/src/linux/iopl.c",
+"musl/src/linux/klogctl.c",
+"musl/src/linux/memfd_create.c",
+"musl/src/linux/mlock2.c",
+"musl/src/linux/module.c",
+"musl/src/linux/mount.c",
+"musl/src/linux/name_to_handle_at.c",
+"musl/src/linux/open_by_handle_at.c",
+"musl/src/linux/personality.c",
+"musl/src/linux/pivot_root.c",
+"musl/src/linux/ppoll.c",
+"musl/src/linux/prctl.c",
+"musl/src/linux/prlimit.c",
+"musl/src/linux/process_vm.c",
+"musl/src/linux/ptrace.c",
+"musl/src/linux/quotactl.c",
+"musl/src/linux/readahead.c",
+"musl/src/linux/reboot.c",
+"musl/src/linux/remap_file_pages.c",
+"musl/src/linux/sbrk.c",
+"musl/src/linux/sendfile.c",
+"musl/src/linux/setfsgid.c",
+"musl/src/linux/setfsuid.c",
+"musl/src/linux/setgroups.c",
+"musl/src/linux/sethostname.c",
+"musl/src/linux/setns.c",
+"musl/src/linux/settimeofday.c",
+"musl/src/linux/signalfd.c",
+"musl/src/linux/splice.c",
+"musl/src/linux/stime.c",
+"musl/src/linux/swap.c",
+"musl/src/linux/sync_file_range.c",
+"musl/src/linux/syncfs.c",
+"musl/src/linux/sysinfo.c",
+"musl/src/linux/tee.c",
+"musl/src/linux/timerfd.c",
+"musl/src/linux/unshare.c",
+"musl/src/linux/utimes.c",
+"musl/src/linux/vhangup.c",
+"musl/src/linux/vmsplice.c",
+"musl/src/linux/wait3.c",
+"musl/src/linux/wait4.c",
+"musl/src/linux/x32/sysinfo.c",
+"musl/src/linux/xattr.c",
+"musl/src/locale/__lctrans.c",
+"musl/src/locale/__mo_lookup.c",
+"musl/src/locale/big5.h",
+"musl/src/locale/bind_textdomain_codeset.c",
+"musl/src/locale/c_locale.c",
+"musl/src/locale/catclose.c",
+"musl/src/locale/catgets.c",
+"musl/src/locale/catopen.c",
+"musl/src/locale/codepages.h",
+"musl/src/locale/dcngettext.c",
+"musl/src/locale/duplocale.c",
+"musl/src/locale/freelocale.c",
+"musl/src/locale/gb18030.h",
+"musl/src/locale/hkscs.h",
+"musl/src/locale/iconv.c",
+"musl/src/locale/iconv_close.c",
+"musl/src/locale/jis0208.h",
+"musl/src/locale/ksc.h",
+"musl/src/locale/langinfo.c",
+"musl/src/locale/legacychars.h",
+"musl/src/locale/locale_map.c",
+"musl/src/locale/localeconv.c",
+"musl/src/locale/newlocale.c",
+"musl/src/locale/pleval.c",
+"musl/src/locale/pleval.h",
+"musl/src/locale/revjis.h",
+"musl/src/locale/setlocale.c",
+"musl/src/locale/strcoll.c",
+"musl/src/locale/strfmon.c",
+"musl/src/locale/strxfrm.c",
+"musl/src/locale/textdomain.c",
+"musl/src/locale/uselocale.c",
+"musl/src/locale/wcscoll.c",
+"musl/src/locale/wcsxfrm.c",
+"musl/src/malloc/DESIGN",
+"musl/src/malloc/aligned_alloc.c",
+"musl/src/malloc/expand_heap.c",
+"musl/src/malloc/lite_malloc.c",
+"musl/src/malloc/malloc.c",
+"musl/src/malloc/malloc_usable_size.c",
+"musl/src/malloc/memalign.c",
+"musl/src/malloc/posix_memalign.c",
+"musl/src/math/__cos.c",
+"musl/src/math/__cosdf.c",
+"musl/src/math/__cosl.c",
+"musl/src/math/__expo2.c",
+"musl/src/math/__expo2f.c",
+"musl/src/math/__fpclassify.c",
+"musl/src/math/__fpclassifyf.c",
+"musl/src/math/__fpclassifyl.c",
+"musl/src/math/__invtrigl.c",
+"musl/src/math/__invtrigl.h",
+"musl/src/math/__polevll.c",
+"musl/src/math/__rem_pio2.c",
+"musl/src/math/__rem_pio2_large.c",
+"musl/src/math/__rem_pio2f.c",
+"musl/src/math/__rem_pio2l.c",
+"musl/src/math/__signbit.c",
+"musl/src/math/__signbitf.c",
+"musl/src/math/__signbitl.c",
+"musl/src/math/__sin.c",
+"musl/src/math/__sindf.c",
+"musl/src/math/__sinl.c",
+"musl/src/math/__tan.c",
+"musl/src/math/__tandf.c",
+"musl/src/math/__tanl.c",
+"musl/src/math/aarch64/ceil.c",
+"musl/src/math/aarch64/ceilf.c",
+"musl/src/math/aarch64/fabs.c",
+"musl/src/math/aarch64/fabsf.c",
+"musl/src/math/aarch64/floor.c",
+"musl/src/math/aarch64/floorf.c",
+"musl/src/math/aarch64/fma.c",
+"musl/src/math/aarch64/fmaf.c",
+"musl/src/math/aarch64/fmax.c",
+"musl/src/math/aarch64/fmaxf.c",
+"musl/src/math/aarch64/fmin.c",
+"musl/src/math/aarch64/fminf.c",
+"musl/src/math/aarch64/llrint.c",
+"musl/src/math/aarch64/llrintf.c",
+"musl/src/math/aarch64/llround.c",
+"musl/src/math/aarch64/llroundf.c",
+"musl/src/math/aarch64/lrint.c",
+"musl/src/math/aarch64/lrintf.c",
+"musl/src/math/aarch64/lround.c",
+"musl/src/math/aarch64/lroundf.c",
+"musl/src/math/aarch64/nearbyint.c",
+"musl/src/math/aarch64/nearbyintf.c",
+"musl/src/math/aarch64/rint.c",
+"musl/src/math/aarch64/rintf.c",
+"musl/src/math/aarch64/round.c",
+"musl/src/math/aarch64/roundf.c",
+"musl/src/math/aarch64/sqrt.c",
+"musl/src/math/aarch64/sqrtf.c",
+"musl/src/math/aarch64/trunc.c",
+"musl/src/math/aarch64/truncf.c",
+"musl/src/math/acos.c",
+"musl/src/math/acosf.c",
+"musl/src/math/acosh.c",
+"musl/src/math/acoshf.c",
+"musl/src/math/acoshl.c",
+"musl/src/math/acosl.c",
+"musl/src/math/arm/fabs.c",
+"musl/src/math/arm/fabsf.c",
+"musl/src/math/arm/fma.c",
+"musl/src/math/arm/fmaf.c",
+"musl/src/math/arm/sqrt.c",
+"musl/src/math/arm/sqrtf.c",
+"musl/src/math/asin.c",
+"musl/src/math/asinf.c",
+"musl/src/math/asinh.c",
+"musl/src/math/asinhf.c",
+"musl/src/math/asinhl.c",
+"musl/src/math/asinl.c",
+"musl/src/math/atan.c",
+"musl/src/math/atan2.c",
+"musl/src/math/atan2f.c",
+"musl/src/math/atan2l.c",
+"musl/src/math/atanf.c",
+"musl/src/math/atanh.c",
+"musl/src/math/atanhf.c",
+"musl/src/math/atanhl.c",
+"musl/src/math/atanl.c",
+"musl/src/math/cbrt.c",
+"musl/src/math/cbrtf.c",
+"musl/src/math/cbrtl.c",
+"musl/src/math/ceil.c",
+"musl/src/math/ceilf.c",
+"musl/src/math/ceill.c",
+"musl/src/math/copysign.c",
+"musl/src/math/copysignf.c",
+"musl/src/math/copysignl.c",
+"musl/src/math/cos.c",
+"musl/src/math/cosf.c",
+"musl/src/math/cosh.c",
+"musl/src/math/coshf.c",
+"musl/src/math/coshl.c",
+"musl/src/math/cosl.c",
+"musl/src/math/erf.c",
+"musl/src/math/erff.c",
+"musl/src/math/erfl.c",
+"musl/src/math/exp.c",
+"musl/src/math/exp10.c",
+"musl/src/math/exp10f.c",
+"musl/src/math/exp10l.c",
+"musl/src/math/exp2.c",
+"musl/src/math/exp2f.c",
+"musl/src/math/exp2l.c",
+"musl/src/math/expf.c",
+"musl/src/math/expl.c",
+"musl/src/math/expm1.c",
+"musl/src/math/expm1f.c",
+"musl/src/math/expm1l.c",
+"musl/src/math/fabs.c",
+"musl/src/math/fabsf.c",
+"musl/src/math/fabsl.c",
+"musl/src/math/fdim.c",
+"musl/src/math/fdimf.c",
+"musl/src/math/fdiml.c",
+"musl/src/math/finite.c",
+"musl/src/math/finitef.c",
+"musl/src/math/floor.c",
+"musl/src/math/floorf.c",
+"musl/src/math/floorl.c",
+"musl/src/math/fma.c",
+"musl/src/math/fmaf.c",
+"musl/src/math/fmal.c",
+"musl/src/math/fmax.c",
+"musl/src/math/fmaxf.c",
+"musl/src/math/fmaxl.c",
+"musl/src/math/fmin.c",
+"musl/src/math/fminf.c",
+"musl/src/math/fminl.c",
+"musl/src/math/fmod.c",
+"musl/src/math/fmodf.c",
+"musl/src/math/fmodl.c",
+"musl/src/math/frexp.c",
+"musl/src/math/frexpf.c",
+"musl/src/math/frexpl.c",
+"musl/src/math/hypot.c",
+"musl/src/math/hypotf.c",
+"musl/src/math/hypotl.c",
+"musl/src/math/i386/__invtrigl.s",
+"musl/src/math/i386/acos.s",
+"musl/src/math/i386/acosf.s",
+"musl/src/math/i386/acosl.s",
+"musl/src/math/i386/asin.s",
+"musl/src/math/i386/asinf.s",
+"musl/src/math/i386/asinl.s",
+"musl/src/math/i386/atan.s",
+"musl/src/math/i386/atan2.s",
+"musl/src/math/i386/atan2f.s",
+"musl/src/math/i386/atan2l.s",
+"musl/src/math/i386/atanf.s",
+"musl/src/math/i386/atanl.s",
+"musl/src/math/i386/ceil.s",
+"musl/src/math/i386/ceilf.s",
+"musl/src/math/i386/ceill.s",
+"musl/src/math/i386/exp.s",
+"musl/src/math/i386/exp2.s",
+"musl/src/math/i386/exp2f.s",
+"musl/src/math/i386/exp2l.s",
+"musl/src/math/i386/expf.s",
+"musl/src/math/i386/expl.s",
+"musl/src/math/i386/expm1.s",
+"musl/src/math/i386/expm1f.s",
+"musl/src/math/i386/expm1l.s",
+"musl/src/math/i386/fabs.s",
+"musl/src/math/i386/fabsf.s",
+"musl/src/math/i386/fabsl.s",
+"musl/src/math/i386/floor.s",
+"musl/src/math/i386/floorf.s",
+"musl/src/math/i386/floorl.s",
+"musl/src/math/i386/fmod.s",
+"musl/src/math/i386/fmodf.s",
+"musl/src/math/i386/fmodl.s",
+"musl/src/math/i386/hypot.s",
+"musl/src/math/i386/hypotf.s",
+"musl/src/math/i386/ldexp.s",
+"musl/src/math/i386/ldexpf.s",
+"musl/src/math/i386/ldexpl.s",
+"musl/src/math/i386/llrint.s",
+"musl/src/math/i386/llrintf.s",
+"musl/src/math/i386/llrintl.s",
+"musl/src/math/i386/log.s",
+"musl/src/math/i386/log10.s",
+"musl/src/math/i386/log10f.s",
+"musl/src/math/i386/log10l.s",
+"musl/src/math/i386/log1p.s",
+"musl/src/math/i386/log1pf.s",
+"musl/src/math/i386/log1pl.s",
+"musl/src/math/i386/log2.s",
+"musl/src/math/i386/log2f.s",
+"musl/src/math/i386/log2l.s",
+"musl/src/math/i386/logf.s",
+"musl/src/math/i386/logl.s",
+"musl/src/math/i386/lrint.s",
+"musl/src/math/i386/lrintf.s",
+"musl/src/math/i386/lrintl.s",
+"musl/src/math/i386/remainder.s",
+"musl/src/math/i386/remainderf.s",
+"musl/src/math/i386/remainderl.s",
+"musl/src/math/i386/remquo.s",
+"musl/src/math/i386/remquof.s",
+"musl/src/math/i386/remquol.s",
+"musl/src/math/i386/rint.s",
+"musl/src/math/i386/rintf.s",
+"musl/src/math/i386/rintl.s",
+"musl/src/math/i386/scalbln.s",
+"musl/src/math/i386/scalblnf.s",
+"musl/src/math/i386/scalblnl.s",
+"musl/src/math/i386/scalbn.s",
+"musl/src/math/i386/scalbnf.s",
+"musl/src/math/i386/scalbnl.s",
+"musl/src/math/i386/sqrt.s",
+"musl/src/math/i386/sqrtf.s",
+"musl/src/math/i386/sqrtl.s",
+"musl/src/math/i386/trunc.s",
+"musl/src/math/i386/truncf.s",
+"musl/src/math/i386/truncl.s",
+"musl/src/math/ilogb.c",
+"musl/src/math/ilogbf.c",
+"musl/src/math/ilogbl.c",
+"musl/src/math/j0.c",
+"musl/src/math/j0f.c",
+"musl/src/math/j1.c",
+"musl/src/math/j1f.c",
+"musl/src/math/jn.c",
+"musl/src/math/jnf.c",
+"musl/src/math/ldexp.c",
+"musl/src/math/ldexpf.c",
+"musl/src/math/ldexpl.c",
+"musl/src/math/lgamma.c",
+"musl/src/math/lgamma_r.c",
+"musl/src/math/lgammaf.c",
+"musl/src/math/lgammaf_r.c",
+"musl/src/math/lgammal.c",
+"musl/src/math/llrint.c",
+"musl/src/math/llrintf.c",
+"musl/src/math/llrintl.c",
+"musl/src/math/llround.c",
+"musl/src/math/llroundf.c",
+"musl/src/math/llroundl.c",
+"musl/src/math/log.c",
+"musl/src/math/log10.c",
+"musl/src/math/log10f.c",
+"musl/src/math/log10l.c",
+"musl/src/math/log1p.c",
+"musl/src/math/log1pf.c",
+"musl/src/math/log1pl.c",
+"musl/src/math/log2.c",
+"musl/src/math/log2f.c",
+"musl/src/math/log2l.c",
+"musl/src/math/logb.c",
+"musl/src/math/logbf.c",
+"musl/src/math/logbl.c",
+"musl/src/math/logf.c",
+"musl/src/math/logl.c",
+"musl/src/math/lrint.c",
+"musl/src/math/lrintf.c",
+"musl/src/math/lrintl.c",
+"musl/src/math/lround.c",
+"musl/src/math/lroundf.c",
+"musl/src/math/lroundl.c",
+"musl/src/math/modf.c",
+"musl/src/math/modff.c",
+"musl/src/math/modfl.c",
+"musl/src/math/nan.c",
+"musl/src/math/nanf.c",
+"musl/src/math/nanl.c",
+"musl/src/math/nearbyint.c",
+"musl/src/math/nearbyintf.c",
+"musl/src/math/nearbyintl.c",
+"musl/src/math/nextafter.c",
+"musl/src/math/nextafterf.c",
+"musl/src/math/nextafterl.c",
+"musl/src/math/nexttoward.c",
+"musl/src/math/nexttowardf.c",
+"musl/src/math/nexttowardl.c",
+"musl/src/math/pow.c",
+"musl/src/math/powerpc/fabs.c",
+"musl/src/math/powerpc/fabsf.c",
+"musl/src/math/powerpc/fma.c",
+"musl/src/math/powerpc/fmaf.c",
+"musl/src/math/powerpc/sqrt.c",
+"musl/src/math/powerpc/sqrtf.c",
+"musl/src/math/powerpc64/ceil.c",
+"musl/src/math/powerpc64/ceilf.c",
+"musl/src/math/powerpc64/fabs.c",
+"musl/src/math/powerpc64/fabsf.c",
+"musl/src/math/powerpc64/floor.c",
+"musl/src/math/powerpc64/floorf.c",
+"musl/src/math/powerpc64/fma.c",
+"musl/src/math/powerpc64/fmaf.c",
+"musl/src/math/powerpc64/fmax.c",
+"musl/src/math/powerpc64/fmaxf.c",
+"musl/src/math/powerpc64/fmin.c",
+"musl/src/math/powerpc64/fminf.c",
+"musl/src/math/powerpc64/lrint.c",
+"musl/src/math/powerpc64/lrintf.c",
+"musl/src/math/powerpc64/lround.c",
+"musl/src/math/powerpc64/lroundf.c",
+"musl/src/math/powerpc64/round.c",
+"musl/src/math/powerpc64/roundf.c",
+"musl/src/math/powerpc64/sqrt.c",
+"musl/src/math/powerpc64/sqrtf.c",
+"musl/src/math/powerpc64/trunc.c",
+"musl/src/math/powerpc64/truncf.c",
+"musl/src/math/powf.c",
+"musl/src/math/powl.c",
+"musl/src/math/remainder.c",
+"musl/src/math/remainderf.c",
+"musl/src/math/remainderl.c",
+"musl/src/math/remquo.c",
+"musl/src/math/remquof.c",
+"musl/src/math/remquol.c",
+"musl/src/math/rint.c",
+"musl/src/math/rintf.c",
+"musl/src/math/rintl.c",
+"musl/src/math/round.c",
+"musl/src/math/roundf.c",
+"musl/src/math/roundl.c",
+"musl/src/math/s390x/ceil.c",
+"musl/src/math/s390x/ceilf.c",
+"musl/src/math/s390x/ceill.c",
+"musl/src/math/s390x/fabs.c",
+"musl/src/math/s390x/fabsf.c",
+"musl/src/math/s390x/fabsl.c",
+"musl/src/math/s390x/floor.c",
+"musl/src/math/s390x/floorf.c",
+"musl/src/math/s390x/floorl.c",
+"musl/src/math/s390x/fma.c",
+"musl/src/math/s390x/fmaf.c",
+"musl/src/math/s390x/nearbyint.c",
+"musl/src/math/s390x/nearbyintf.c",
+"musl/src/math/s390x/nearbyintl.c",
+"musl/src/math/s390x/rint.c",
+"musl/src/math/s390x/rintf.c",
+"musl/src/math/s390x/rintl.c",
+"musl/src/math/s390x/round.c",
+"musl/src/math/s390x/roundf.c",
+"musl/src/math/s390x/roundl.c",
+"musl/src/math/s390x/sqrt.c",
+"musl/src/math/s390x/sqrtf.c",
+"musl/src/math/s390x/sqrtl.c",
+"musl/src/math/s390x/trunc.c",
+"musl/src/math/s390x/truncf.c",
+"musl/src/math/s390x/truncl.c",
+"musl/src/math/scalb.c",
+"musl/src/math/scalbf.c",
+"musl/src/math/scalbln.c",
+"musl/src/math/scalblnf.c",
+"musl/src/math/scalblnl.c",
+"musl/src/math/scalbn.c",
+"musl/src/math/scalbnf.c",
+"musl/src/math/scalbnl.c",
+"musl/src/math/signgam.c",
+"musl/src/math/significand.c",
+"musl/src/math/significandf.c",
+"musl/src/math/sin.c",
+"musl/src/math/sincos.c",
+"musl/src/math/sincosf.c",
+"musl/src/math/sincosl.c",
+"musl/src/math/sinf.c",
+"musl/src/math/sinh.c",
+"musl/src/math/sinhf.c",
+"musl/src/math/sinhl.c",
+"musl/src/math/sinl.c",
+"musl/src/math/sqrt.c",
+"musl/src/math/sqrtf.c",
+"musl/src/math/sqrtl.c",
+"musl/src/math/tan.c",
+"musl/src/math/tanf.c",
+"musl/src/math/tanh.c",
+"musl/src/math/tanhf.c",
+"musl/src/math/tanhl.c",
+"musl/src/math/tanl.c",
+"musl/src/math/tgamma.c",
+"musl/src/math/tgammaf.c",
+"musl/src/math/tgammal.c",
+"musl/src/math/trunc.c",
+"musl/src/math/truncf.c",
+"musl/src/math/truncl.c",
+"musl/src/math/x32/__invtrigl.s",
+"musl/src/math/x32/acosl.s",
+"musl/src/math/x32/asinl.s",
+"musl/src/math/x32/atan2l.s",
+"musl/src/math/x32/atanl.s",
+"musl/src/math/x32/ceill.s",
+"musl/src/math/x32/exp2l.s",
+"musl/src/math/x32/expl.s",
+"musl/src/math/x32/expm1l.s",
+"musl/src/math/x32/fabs.s",
+"musl/src/math/x32/fabsf.s",
+"musl/src/math/x32/fabsl.s",
+"musl/src/math/x32/floorl.s",
+"musl/src/math/x32/fma.c",
+"musl/src/math/x32/fmaf.c",
+"musl/src/math/x32/fmodl.s",
+"musl/src/math/x32/llrint.s",
+"musl/src/math/x32/llrintf.s",
+"musl/src/math/x32/llrintl.s",
+"musl/src/math/x32/log10l.s",
+"musl/src/math/x32/log1pl.s",
+"musl/src/math/x32/log2l.s",
+"musl/src/math/x32/logl.s",
+"musl/src/math/x32/lrint.s",
+"musl/src/math/x32/lrintf.s",
+"musl/src/math/x32/lrintl.s",
+"musl/src/math/x32/remainderl.s",
+"musl/src/math/x32/rintl.s",
+"musl/src/math/x32/sqrt.s",
+"musl/src/math/x32/sqrtf.s",
+"musl/src/math/x32/sqrtl.s",
+"musl/src/math/x32/truncl.s",
+"musl/src/math/x86_64/__invtrigl.s",
+"musl/src/math/x86_64/acosl.s",
+"musl/src/math/x86_64/asinl.s",
+"musl/src/math/x86_64/atan2l.s",
+"musl/src/math/x86_64/atanl.s",
+"musl/src/math/x86_64/ceill.s",
+"musl/src/math/x86_64/exp2l.s",
+"musl/src/math/x86_64/expl.s",
+"musl/src/math/x86_64/expm1l.s",
+"musl/src/math/x86_64/fabs.s",
+"musl/src/math/x86_64/fabsf.s",
+"musl/src/math/x86_64/fabsl.s",
+"musl/src/math/x86_64/floorl.s",
+"musl/src/math/x86_64/fma.c",
+"musl/src/math/x86_64/fmaf.c",
+"musl/src/math/x86_64/fmodl.s",
+"musl/src/math/x86_64/llrint.s",
+"musl/src/math/x86_64/llrintf.s",
+"musl/src/math/x86_64/llrintl.s",
+"musl/src/math/x86_64/log10l.s",
+"musl/src/math/x86_64/log1pl.s",
+"musl/src/math/x86_64/log2l.s",
+"musl/src/math/x86_64/logl.s",
+"musl/src/math/x86_64/lrint.s",
+"musl/src/math/x86_64/lrintf.s",
+"musl/src/math/x86_64/lrintl.s",
+"musl/src/math/x86_64/remainderl.s",
+"musl/src/math/x86_64/rintl.s",
+"musl/src/math/x86_64/sqrt.s",
+"musl/src/math/x86_64/sqrtf.s",
+"musl/src/math/x86_64/sqrtl.s",
+"musl/src/math/x86_64/truncl.s",
+"musl/src/misc/a64l.c",
+"musl/src/misc/basename.c",
+"musl/src/misc/dirname.c",
+"musl/src/misc/ffs.c",
+"musl/src/misc/ffsl.c",
+"musl/src/misc/ffsll.c",
+"musl/src/misc/fmtmsg.c",
+"musl/src/misc/forkpty.c",
+"musl/src/misc/get_current_dir_name.c",
+"musl/src/misc/getauxval.c",
+"musl/src/misc/getdomainname.c",
+"musl/src/misc/getentropy.c",
+"musl/src/misc/gethostid.c",
+"musl/src/misc/getopt.c",
+"musl/src/misc/getopt_long.c",
+"musl/src/misc/getpriority.c",
+"musl/src/misc/getresgid.c",
+"musl/src/misc/getresuid.c",
+"musl/src/misc/getrlimit.c",
+"musl/src/misc/getrusage.c",
+"musl/src/misc/getsubopt.c",
+"musl/src/misc/initgroups.c",
+"musl/src/misc/ioctl.c",
+"musl/src/misc/issetugid.c",
+"musl/src/misc/lockf.c",
+"musl/src/misc/login_tty.c",
+"musl/src/misc/mntent.c",
+"musl/src/misc/nftw.c",
+"musl/src/misc/openpty.c",
+"musl/src/misc/ptsname.c",
+"musl/src/misc/pty.c",
+"musl/src/misc/realpath.c",
+"musl/src/misc/setdomainname.c",
+"musl/src/misc/setpriority.c",
+"musl/src/misc/setrlimit.c",
+"musl/src/misc/syscall.c",
+"musl/src/misc/syslog.c",
+"musl/src/misc/uname.c",
+"musl/src/misc/wordexp.c",
+"musl/src/mman/madvise.c",
+"musl/src/mman/mincore.c",
+"musl/src/mman/mlock.c",
+"musl/src/mman/mlockall.c",
+"musl/src/mman/mmap.c",
+"musl/src/mman/mprotect.c",
+"musl/src/mman/mremap.c",
+"musl/src/mman/msync.c",
+"musl/src/mman/munlock.c",
+"musl/src/mman/munlockall.c",
+"musl/src/mman/munmap.c",
+"musl/src/mman/posix_madvise.c",
+"musl/src/mman/shm_open.c",
+"musl/src/mq/mq_close.c",
+"musl/src/mq/mq_getattr.c",
+"musl/src/mq/mq_notify.c",
+"musl/src/mq/mq_open.c",
+"musl/src/mq/mq_receive.c",
+"musl/src/mq/mq_send.c",
+"musl/src/mq/mq_setattr.c",
+"musl/src/mq/mq_timedreceive.c",
+"musl/src/mq/mq_timedsend.c",
+"musl/src/mq/mq_unlink.c",
+"musl/src/multibyte/btowc.c",
+"musl/src/multibyte/c16rtomb.c",
+"musl/src/multibyte/c32rtomb.c",
+"musl/src/multibyte/internal.c",
+"musl/src/multibyte/internal.h",
+"musl/src/multibyte/mblen.c",
+"musl/src/multibyte/mbrlen.c",
+"musl/src/multibyte/mbrtoc16.c",
+"musl/src/multibyte/mbrtoc32.c",
+"musl/src/multibyte/mbrtowc.c",
+"musl/src/multibyte/mbsinit.c",
+"musl/src/multibyte/mbsnrtowcs.c",
+"musl/src/multibyte/mbsrtowcs.c",
+"musl/src/multibyte/mbstowcs.c",
+"musl/src/multibyte/mbtowc.c",
+"musl/src/multibyte/wcrtomb.c",
+"musl/src/multibyte/wcsnrtombs.c",
+"musl/src/multibyte/wcsrtombs.c",
+"musl/src/multibyte/wcstombs.c",
+"musl/src/multibyte/wctob.c",
+"musl/src/multibyte/wctomb.c",
+"musl/src/network/accept.c",
+"musl/src/network/accept4.c",
+"musl/src/network/bind.c",
+"musl/src/network/connect.c",
+"musl/src/network/dn_comp.c",
+"musl/src/network/dn_expand.c",
+"musl/src/network/dn_skipname.c",
+"musl/src/network/dns_parse.c",
+"musl/src/network/ent.c",
+"musl/src/network/ether.c",
+"musl/src/network/freeaddrinfo.c",
+"musl/src/network/gai_strerror.c",
+"musl/src/network/getaddrinfo.c",
+"musl/src/network/gethostbyaddr.c",
+"musl/src/network/gethostbyaddr_r.c",
+"musl/src/network/gethostbyname.c",
+"musl/src/network/gethostbyname2.c",
+"musl/src/network/gethostbyname2_r.c",
+"musl/src/network/gethostbyname_r.c",
+"musl/src/network/getifaddrs.c",
+"musl/src/network/getnameinfo.c",
+"musl/src/network/getpeername.c",
+"musl/src/network/getservbyname.c",
+"musl/src/network/getservbyname_r.c",
+"musl/src/network/getservbyport.c",
+"musl/src/network/getservbyport_r.c",
+"musl/src/network/getsockname.c",
+"musl/src/network/getsockopt.c",
+"musl/src/network/h_errno.c",
+"musl/src/network/herror.c",
+"musl/src/network/hstrerror.c",
+"musl/src/network/htonl.c",
+"musl/src/network/htons.c",
+"musl/src/network/if_freenameindex.c",
+"musl/src/network/if_indextoname.c",
+"musl/src/network/if_nameindex.c",
+"musl/src/network/if_nametoindex.c",
+"musl/src/network/in6addr_any.c",
+"musl/src/network/in6addr_loopback.c",
+"musl/src/network/inet_addr.c",
+"musl/src/network/inet_aton.c",
+"musl/src/network/inet_legacy.c",
+"musl/src/network/inet_ntoa.c",
+"musl/src/network/inet_ntop.c",
+"musl/src/network/inet_pton.c",
+"musl/src/network/listen.c",
+"musl/src/network/lookup.h",
+"musl/src/network/lookup_ipliteral.c",
+"musl/src/network/lookup_name.c",
+"musl/src/network/lookup_serv.c",
+"musl/src/network/netlink.c",
+"musl/src/network/netlink.h",
+"musl/src/network/netname.c",
+"musl/src/network/ns_parse.c",
+"musl/src/network/ntohl.c",
+"musl/src/network/ntohs.c",
+"musl/src/network/proto.c",
+"musl/src/network/recv.c",
+"musl/src/network/recvfrom.c",
+"musl/src/network/recvmmsg.c",
+"musl/src/network/recvmsg.c",
+"musl/src/network/res_init.c",
+"musl/src/network/res_mkquery.c",
+"musl/src/network/res_msend.c",
+"musl/src/network/res_query.c",
+"musl/src/network/res_querydomain.c",
+"musl/src/network/res_send.c",
+"musl/src/network/res_state.c",
+"musl/src/network/resolvconf.c",
+"musl/src/network/send.c",
+"musl/src/network/sendmmsg.c",
+"musl/src/network/sendmsg.c",
+"musl/src/network/sendto.c",
+"musl/src/network/serv.c",
+"musl/src/network/setsockopt.c",
+"musl/src/network/shutdown.c",
+"musl/src/network/sockatmark.c",
+"musl/src/network/socket.c",
+"musl/src/network/socketpair.c",
+"musl/src/passwd/fgetgrent.c",
+"musl/src/passwd/fgetpwent.c",
+"musl/src/passwd/fgetspent.c",
+"musl/src/passwd/getgr_a.c",
+"musl/src/passwd/getgr_r.c",
+"musl/src/passwd/getgrent.c",
+"musl/src/passwd/getgrent_a.c",
+"musl/src/passwd/getgrouplist.c",
+"musl/src/passwd/getpw_a.c",
+"musl/src/passwd/getpw_r.c",
+"musl/src/passwd/getpwent.c",
+"musl/src/passwd/getpwent_a.c",
+"musl/src/passwd/getspent.c",
+"musl/src/passwd/getspnam.c",
+"musl/src/passwd/getspnam_r.c",
+"musl/src/passwd/lckpwdf.c",
+"musl/src/passwd/nscd.h",
+"musl/src/passwd/nscd_query.c",
+"musl/src/passwd/putgrent.c",
+"musl/src/passwd/putpwent.c",
+"musl/src/passwd/putspent.c",
+"musl/src/passwd/pwf.h",
+"musl/src/prng/__rand48_step.c",
+"musl/src/prng/__seed48.c",
+"musl/src/prng/drand48.c",
+"musl/src/prng/lcong48.c",
+"musl/src/prng/lrand48.c",
+"musl/src/prng/mrand48.c",
+"musl/src/prng/rand.c",
+"musl/src/prng/rand48.h",
+"musl/src/prng/rand_r.c",
+"musl/src/prng/random.c",
+"musl/src/prng/seed48.c",
+"musl/src/prng/srand48.c",
+"musl/src/process/arm/vfork.s",
+"musl/src/process/execl.c",
+"musl/src/process/execle.c",
+"musl/src/process/execlp.c",
+"musl/src/process/execv.c",
+"musl/src/process/execve.c",
+"musl/src/process/execvp.c",
+"musl/src/process/fdop.h",
+"musl/src/process/fexecve.c",
+"musl/src/process/fork.c",
+"musl/src/process/i386/vfork.s",
+"musl/src/process/posix_spawn.c",
+"musl/src/process/posix_spawn_file_actions_addclose.c",
+"musl/src/process/posix_spawn_file_actions_adddup2.c",
+"musl/src/process/posix_spawn_file_actions_addopen.c",
+"musl/src/process/posix_spawn_file_actions_destroy.c",
+"musl/src/process/posix_spawn_file_actions_init.c",
+"musl/src/process/posix_spawnattr_destroy.c",
+"musl/src/process/posix_spawnattr_getflags.c",
+"musl/src/process/posix_spawnattr_getpgroup.c",
+"musl/src/process/posix_spawnattr_getsigdefault.c",
+"musl/src/process/posix_spawnattr_getsigmask.c",
+"musl/src/process/posix_spawnattr_init.c",
+"musl/src/process/posix_spawnattr_sched.c",
+"musl/src/process/posix_spawnattr_setflags.c",
+"musl/src/process/posix_spawnattr_setpgroup.c",
+"musl/src/process/posix_spawnattr_setsigdefault.c",
+"musl/src/process/posix_spawnattr_setsigmask.c",
+"musl/src/process/posix_spawnp.c",
+"musl/src/process/s390x/vfork.s",
+"musl/src/process/sh/vfork.s",
+"musl/src/process/system.c",
+"musl/src/process/vfork.c",
+"musl/src/process/wait.c",
+"musl/src/process/waitid.c",
+"musl/src/process/waitpid.c",
+"musl/src/process/x32/vfork.s",
+"musl/src/process/x86_64/vfork.s",
+"musl/src/regex/fnmatch.c",
+"musl/src/regex/glob.c",
+"musl/src/regex/regcomp.c",
+"musl/src/regex/regerror.c",
+"musl/src/regex/regexec.c",
+"musl/src/regex/tre-mem.c",
+"musl/src/regex/tre.h",
+"musl/src/sched/affinity.c",
+"musl/src/sched/sched_cpucount.c",
+"musl/src/sched/sched_get_priority_max.c",
+"musl/src/sched/sched_getcpu.c",
+"musl/src/sched/sched_getparam.c",
+"musl/src/sched/sched_getscheduler.c",
+"musl/src/sched/sched_rr_get_interval.c",
+"musl/src/sched/sched_setparam.c",
+"musl/src/sched/sched_setscheduler.c",
+"musl/src/sched/sched_yield.c",
+"musl/src/search/hsearch.c",
+"musl/src/search/insque.c",
+"musl/src/search/lsearch.c",
+"musl/src/search/tdelete.c",
+"musl/src/search/tdestroy.c",
+"musl/src/search/tfind.c",
+"musl/src/search/tsearch.c",
+"musl/src/search/tsearch.h",
+"musl/src/search/twalk.c",
+"musl/src/select/poll.c",
+"musl/src/select/pselect.c",
+"musl/src/select/select.c",
+"musl/src/setjmp/aarch64/longjmp.s",
+"musl/src/setjmp/aarch64/setjmp.s",
+"musl/src/setjmp/arm/longjmp.s",
+"musl/src/setjmp/arm/setjmp.s",
+"musl/src/setjmp/i386/longjmp.s",
+"musl/src/setjmp/i386/setjmp.s",
+"musl/src/setjmp/longjmp.c",
+"musl/src/setjmp/m68k/longjmp.s",
+"musl/src/setjmp/m68k/setjmp.s",
+"musl/src/setjmp/microblaze/longjmp.s",
+"musl/src/setjmp/microblaze/setjmp.s",
+"musl/src/setjmp/mips/longjmp.S",
+"musl/src/setjmp/mips/setjmp.S",
+"musl/src/setjmp/mips64/longjmp.S",
+"musl/src/setjmp/mips64/setjmp.S",
+"musl/src/setjmp/mipsn32/longjmp.S",
+"musl/src/setjmp/mipsn32/setjmp.S",
+"musl/src/setjmp/or1k/longjmp.s",
+"musl/src/setjmp/or1k/setjmp.s",
+"musl/src/setjmp/powerpc/longjmp.S",
+"musl/src/setjmp/powerpc/setjmp.S",
+"musl/src/setjmp/powerpc64/longjmp.s",
+"musl/src/setjmp/powerpc64/setjmp.s",
+"musl/src/setjmp/s390x/longjmp.s",
+"musl/src/setjmp/s390x/setjmp.s",
+"musl/src/setjmp/setjmp.c",
+"musl/src/setjmp/sh/longjmp.S",
+"musl/src/setjmp/sh/setjmp.S",
+"musl/src/setjmp/x32/longjmp.s",
+"musl/src/setjmp/x32/setjmp.s",
+"musl/src/setjmp/x86_64/longjmp.s",
+"musl/src/setjmp/x86_64/setjmp.s",
+"musl/src/signal/aarch64/restore.s",
+"musl/src/signal/aarch64/sigsetjmp.s",
+"musl/src/signal/arm/restore.s",
+"musl/src/signal/arm/sigsetjmp.s",
+"musl/src/signal/block.c",
+"musl/src/signal/getitimer.c",
+"musl/src/signal/i386/restore.s",
+"musl/src/signal/i386/sigsetjmp.s",
+"musl/src/signal/kill.c",
+"musl/src/signal/killpg.c",
+"musl/src/signal/m68k/sigsetjmp.s",
+"musl/src/signal/microblaze/restore.s",
+"musl/src/signal/microblaze/sigsetjmp.s",
+"musl/src/signal/mips/restore.s",
+"musl/src/signal/mips/sigsetjmp.s",
+"musl/src/signal/mips64/restore.s",
+"musl/src/signal/mips64/sigsetjmp.s",
+"musl/src/signal/mipsn32/restore.s",
+"musl/src/signal/mipsn32/sigsetjmp.s",
+"musl/src/signal/or1k/sigsetjmp.s",
+"musl/src/signal/powerpc/restore.s",
+"musl/src/signal/powerpc/sigsetjmp.s",
+"musl/src/signal/powerpc64/restore.s",
+"musl/src/signal/powerpc64/sigsetjmp.s",
+"musl/src/signal/psiginfo.c",
+"musl/src/signal/psignal.c",
+"musl/src/signal/raise.c",
+"musl/src/signal/restore.c",
+"musl/src/signal/s390x/restore.s",
+"musl/src/signal/s390x/sigsetjmp.s",
+"musl/src/signal/setitimer.c",
+"musl/src/signal/sh/restore.s",
+"musl/src/signal/sh/sigsetjmp.s",
+"musl/src/signal/sigaction.c",
+"musl/src/signal/sigaddset.c",
+"musl/src/signal/sigaltstack.c",
+"musl/src/signal/sigandset.c",
+"musl/src/signal/sigdelset.c",
+"musl/src/signal/sigemptyset.c",
+"musl/src/signal/sigfillset.c",
+"musl/src/signal/sighold.c",
+"musl/src/signal/sigignore.c",
+"musl/src/signal/siginterrupt.c",
+"musl/src/signal/sigisemptyset.c",
+"musl/src/signal/sigismember.c",
+"musl/src/signal/siglongjmp.c",
+"musl/src/signal/signal.c",
+"musl/src/signal/sigorset.c",
+"musl/src/signal/sigpause.c",
+"musl/src/signal/sigpending.c",
+"musl/src/signal/sigprocmask.c",
+"musl/src/signal/sigqueue.c",
+"musl/src/signal/sigrelse.c",
+"musl/src/signal/sigrtmax.c",
+"musl/src/signal/sigrtmin.c",
+"musl/src/signal/sigset.c",
+"musl/src/signal/sigsetjmp.c",
+"musl/src/signal/sigsetjmp_tail.c",
+"musl/src/signal/sigsuspend.c",
+"musl/src/signal/sigtimedwait.c",
+"musl/src/signal/sigwait.c",
+"musl/src/signal/sigwaitinfo.c",
+"musl/src/signal/x32/restore.s",
+"musl/src/signal/x32/sigsetjmp.s",
+"musl/src/signal/x86_64/restore.s",
+"musl/src/signal/x86_64/sigsetjmp.s",
+"musl/src/stat/__xstat.c",
+"musl/src/stat/chmod.c",
+"musl/src/stat/fchmod.c",
+"musl/src/stat/fchmodat.c",
+"musl/src/stat/fstat.c",
+"musl/src/stat/fstatat.c",
+"musl/src/stat/futimens.c",
+"musl/src/stat/futimesat.c",
+"musl/src/stat/lchmod.c",
+"musl/src/stat/lstat.c",
+"musl/src/stat/mkdir.c",
+"musl/src/stat/mkdirat.c",
+"musl/src/stat/mkfifo.c",
+"musl/src/stat/mkfifoat.c",
+"musl/src/stat/mknod.c",
+"musl/src/stat/mknodat.c",
+"musl/src/stat/stat.c",
+"musl/src/stat/statvfs.c",
+"musl/src/stat/umask.c",
+"musl/src/stat/utimensat.c",
+"musl/src/stdio/__fclose_ca.c",
+"musl/src/stdio/__fdopen.c",
+"musl/src/stdio/__fmodeflags.c",
+"musl/src/stdio/__fopen_rb_ca.c",
+"musl/src/stdio/__lockfile.c",
+"musl/src/stdio/__overflow.c",
+"musl/src/stdio/__stdio_close.c",
+"musl/src/stdio/__stdio_exit.c",
+"musl/src/stdio/__stdio_read.c",
+"musl/src/stdio/__stdio_seek.c",
+"musl/src/stdio/__stdio_write.c",
+"musl/src/stdio/__stdout_write.c",
+"musl/src/stdio/__string_read.c",
+"musl/src/stdio/__toread.c",
+"musl/src/stdio/__towrite.c",
+"musl/src/stdio/__uflow.c",
+"musl/src/stdio/asprintf.c",
+"musl/src/stdio/clearerr.c",
+"musl/src/stdio/dprintf.c",
+"musl/src/stdio/ext.c",
+"musl/src/stdio/ext2.c",
+"musl/src/stdio/fclose.c",
+"musl/src/stdio/feof.c",
+"musl/src/stdio/ferror.c",
+"musl/src/stdio/fflush.c",
+"musl/src/stdio/fgetc.c",
+"musl/src/stdio/fgetln.c",
+"musl/src/stdio/fgetpos.c",
+"musl/src/stdio/fgets.c",
+"musl/src/stdio/fgetwc.c",
+"musl/src/stdio/fgetws.c",
+"musl/src/stdio/fileno.c",
+"musl/src/stdio/flockfile.c",
+"musl/src/stdio/fmemopen.c",
+"musl/src/stdio/fopen.c",
+"musl/src/stdio/fopencookie.c",
+"musl/src/stdio/fprintf.c",
+"musl/src/stdio/fputc.c",
+"musl/src/stdio/fputs.c",
+"musl/src/stdio/fputwc.c",
+"musl/src/stdio/fputws.c",
+"musl/src/stdio/fread.c",
+"musl/src/stdio/freopen.c",
+"musl/src/stdio/fscanf.c",
+"musl/src/stdio/fseek.c",
+"musl/src/stdio/fsetpos.c",
+"musl/src/stdio/ftell.c",
+"musl/src/stdio/ftrylockfile.c",
+"musl/src/stdio/funlockfile.c",
+"musl/src/stdio/fwide.c",
+"musl/src/stdio/fwprintf.c",
+"musl/src/stdio/fwrite.c",
+"musl/src/stdio/fwscanf.c",
+"musl/src/stdio/getc.c",
+"musl/src/stdio/getc.h",
+"musl/src/stdio/getc_unlocked.c",
+"musl/src/stdio/getchar.c",
+"musl/src/stdio/getchar_unlocked.c",
+"musl/src/stdio/getdelim.c",
+"musl/src/stdio/getline.c",
+"musl/src/stdio/gets.c",
+"musl/src/stdio/getw.c",
+"musl/src/stdio/getwc.c",
+"musl/src/stdio/getwchar.c",
+"musl/src/stdio/ofl.c",
+"musl/src/stdio/ofl_add.c",
+"musl/src/stdio/open_memstream.c",
+"musl/src/stdio/open_wmemstream.c",
+"musl/src/stdio/pclose.c",
+"musl/src/stdio/perror.c",
+"musl/src/stdio/popen.c",
+"musl/src/stdio/printf.c",
+"musl/src/stdio/putc.c",
+"musl/src/stdio/putc.h",
+"musl/src/stdio/putc_unlocked.c",
+"musl/src/stdio/putchar.c",
+"musl/src/stdio/putchar_unlocked.c",
+"musl/src/stdio/puts.c",
+"musl/src/stdio/putw.c",
+"musl/src/stdio/putwc.c",
+"musl/src/stdio/putwchar.c",
+"musl/src/stdio/remove.c",
+"musl/src/stdio/rename.c",
+"musl/src/stdio/rewind.c",
+"musl/src/stdio/scanf.c",
+"musl/src/stdio/setbuf.c",
+"musl/src/stdio/setbuffer.c",
+"musl/src/stdio/setlinebuf.c",
+"musl/src/stdio/setvbuf.c",
+"musl/src/stdio/snprintf.c",
+"musl/src/stdio/sprintf.c",
+"musl/src/stdio/sscanf.c",
+"musl/src/stdio/stderr.c",
+"musl/src/stdio/stdin.c",
+"musl/src/stdio/stdout.c",
+"musl/src/stdio/swprintf.c",
+"musl/src/stdio/swscanf.c",
+"musl/src/stdio/tempnam.c",
+"musl/src/stdio/tmpfile.c",
+"musl/src/stdio/tmpnam.c",
+"musl/src/stdio/ungetc.c",
+"musl/src/stdio/ungetwc.c",
+"musl/src/stdio/vasprintf.c",
+"musl/src/stdio/vdprintf.c",
+"musl/src/stdio/vfprintf.c",
+"musl/src/stdio/vfscanf.c",
+"musl/src/stdio/vfwprintf.c",
+"musl/src/stdio/vfwscanf.c",
+"musl/src/stdio/vprintf.c",
+"musl/src/stdio/vscanf.c",
+"musl/src/stdio/vsnprintf.c",
+"musl/src/stdio/vsprintf.c",
+"musl/src/stdio/vsscanf.c",
+"musl/src/stdio/vswprintf.c",
+"musl/src/stdio/vswscanf.c",
+"musl/src/stdio/vwprintf.c",
+"musl/src/stdio/vwscanf.c",
+"musl/src/stdio/wprintf.c",
+"musl/src/stdio/wscanf.c",
+"musl/src/stdlib/abs.c",
+"musl/src/stdlib/atof.c",
+"musl/src/stdlib/atoi.c",
+"musl/src/stdlib/atol.c",
+"musl/src/stdlib/atoll.c",
+"musl/src/stdlib/bsearch.c",
+"musl/src/stdlib/div.c",
+"musl/src/stdlib/ecvt.c",
+"musl/src/stdlib/fcvt.c",
+"musl/src/stdlib/gcvt.c",
+"musl/src/stdlib/imaxabs.c",
+"musl/src/stdlib/imaxdiv.c",
+"musl/src/stdlib/labs.c",
+"musl/src/stdlib/ldiv.c",
+"musl/src/stdlib/llabs.c",
+"musl/src/stdlib/lldiv.c",
+"musl/src/stdlib/qsort.c",
+"musl/src/stdlib/strtod.c",
+"musl/src/stdlib/strtol.c",
+"musl/src/stdlib/wcstod.c",
+"musl/src/stdlib/wcstol.c",
+"musl/src/string/arm/__aeabi_memcpy.s",
+"musl/src/string/arm/__aeabi_memset.s",
+"musl/src/string/arm/memcpy.c",
+"musl/src/string/arm/memcpy_le.S",
+"musl/src/string/bcmp.c",
+"musl/src/string/bcopy.c",
+"musl/src/string/bzero.c",
+"musl/src/string/explicit_bzero.c",
+"musl/src/string/i386/memcpy.s",
+"musl/src/string/i386/memmove.s",
+"musl/src/string/i386/memset.s",
+"musl/src/string/index.c",
+"musl/src/string/memccpy.c",
+"musl/src/string/memchr.c",
+"musl/src/string/memcmp.c",
+"musl/src/string/memcpy.c",
+"musl/src/string/memmem.c",
+"musl/src/string/memmove.c",
+"musl/src/string/mempcpy.c",
+"musl/src/string/memrchr.c",
+"musl/src/string/memset.c",
+"musl/src/string/rindex.c",
+"musl/src/string/stpcpy.c",
+"musl/src/string/stpncpy.c",
+"musl/src/string/strcasecmp.c",
+"musl/src/string/strcasestr.c",
+"musl/src/string/strcat.c",
+"musl/src/string/strchr.c",
+"musl/src/string/strchrnul.c",
+"musl/src/string/strcmp.c",
+"musl/src/string/strcpy.c",
+"musl/src/string/strcspn.c",
+"musl/src/string/strdup.c",
+"musl/src/string/strerror_r.c",
+"musl/src/string/strlcat.c",
+"musl/src/string/strlcpy.c",
+"musl/src/string/strlen.c",
+"musl/src/string/strncasecmp.c",
+"musl/src/string/strncat.c",
+"musl/src/string/strncmp.c",
+"musl/src/string/strncpy.c",
+"musl/src/string/strndup.c",
+"musl/src/string/strnlen.c",
+"musl/src/string/strpbrk.c",
+"musl/src/string/strrchr.c",
+"musl/src/string/strsep.c",
+"musl/src/string/strsignal.c",
+"musl/src/string/strspn.c",
+"musl/src/string/strstr.c",
+"musl/src/string/strtok.c",
+"musl/src/string/strtok_r.c",
+"musl/src/string/strverscmp.c",
+"musl/src/string/swab.c",
+"musl/src/string/wcpcpy.c",
+"musl/src/string/wcpncpy.c",
+"musl/src/string/wcscasecmp.c",
+"musl/src/string/wcscasecmp_l.c",
+"musl/src/string/wcscat.c",
+"musl/src/string/wcschr.c",
+"musl/src/string/wcscmp.c",
+"musl/src/string/wcscpy.c",
+"musl/src/string/wcscspn.c",
+"musl/src/string/wcsdup.c",
+"musl/src/string/wcslen.c",
+"musl/src/string/wcsncasecmp.c",
+"musl/src/string/wcsncasecmp_l.c",
+"musl/src/string/wcsncat.c",
+"musl/src/string/wcsncmp.c",
+"musl/src/string/wcsncpy.c",
+"musl/src/string/wcsnlen.c",
+"musl/src/string/wcspbrk.c",
+"musl/src/string/wcsrchr.c",
+"musl/src/string/wcsspn.c",
+"musl/src/string/wcsstr.c",
+"musl/src/string/wcstok.c",
+"musl/src/string/wcswcs.c",
+"musl/src/string/wmemchr.c",
+"musl/src/string/wmemcmp.c",
+"musl/src/string/wmemcpy.c",
+"musl/src/string/wmemmove.c",
+"musl/src/string/wmemset.c",
+"musl/src/string/x86_64/memcpy.s",
+"musl/src/string/x86_64/memmove.s",
+"musl/src/string/x86_64/memset.s",
+"musl/src/temp/__randname.c",
+"musl/src/temp/mkdtemp.c",
+"musl/src/temp/mkostemp.c",
+"musl/src/temp/mkostemps.c",
+"musl/src/temp/mkstemp.c",
+"musl/src/temp/mkstemps.c",
+"musl/src/temp/mktemp.c",
+"musl/src/termios/cfgetospeed.c",
+"musl/src/termios/cfmakeraw.c",
+"musl/src/termios/cfsetospeed.c",
+"musl/src/termios/tcdrain.c",
+"musl/src/termios/tcflow.c",
+"musl/src/termios/tcflush.c",
+"musl/src/termios/tcgetattr.c",
+"musl/src/termios/tcgetsid.c",
+"musl/src/termios/tcsendbreak.c",
+"musl/src/termios/tcsetattr.c",
+"musl/src/thread/__lock.c",
+"musl/src/thread/__set_thread_area.c",
+"musl/src/thread/__syscall_cp.c",
+"musl/src/thread/__timedwait.c",
+"musl/src/thread/__tls_get_addr.c",
+"musl/src/thread/__unmapself.c",
+"musl/src/thread/__wait.c",
+"musl/src/thread/aarch64/__set_thread_area.s",
+"musl/src/thread/aarch64/__unmapself.s",
+"musl/src/thread/aarch64/clone.s",
+"musl/src/thread/aarch64/syscall_cp.s",
+"musl/src/thread/arm/__aeabi_read_tp.s",
+"musl/src/thread/arm/__set_thread_area.c",
+"musl/src/thread/arm/__unmapself.s",
+"musl/src/thread/arm/atomics.s",
+"musl/src/thread/arm/clone.s",
+"musl/src/thread/arm/syscall_cp.s",
+"musl/src/thread/call_once.c",
+"musl/src/thread/clone.c",
+"musl/src/thread/cnd_broadcast.c",
+"musl/src/thread/cnd_destroy.c",
+"musl/src/thread/cnd_init.c",
+"musl/src/thread/cnd_signal.c",
+"musl/src/thread/cnd_timedwait.c",
+"musl/src/thread/cnd_wait.c",
+"musl/src/thread/default_attr.c",
+"musl/src/thread/i386/__set_thread_area.s",
+"musl/src/thread/i386/__unmapself.s",
+"musl/src/thread/i386/clone.s",
+"musl/src/thread/i386/syscall_cp.s",
+"musl/src/thread/i386/tls.s",
+"musl/src/thread/lock_ptc.c",
+"musl/src/thread/m68k/__m68k_read_tp.s",
+"musl/src/thread/m68k/clone.s",
+"musl/src/thread/m68k/syscall_cp.s",
+"musl/src/thread/microblaze/__set_thread_area.s",
+"musl/src/thread/microblaze/__unmapself.s",
+"musl/src/thread/microblaze/clone.s",
+"musl/src/thread/microblaze/syscall_cp.s",
+"musl/src/thread/mips/__unmapself.s",
+"musl/src/thread/mips/clone.s",
+"musl/src/thread/mips/syscall_cp.s",
+"musl/src/thread/mips64/__unmapself.s",
+"musl/src/thread/mips64/clone.s",
+"musl/src/thread/mips64/syscall_cp.s",
+"musl/src/thread/mipsn32/__unmapself.s",
+"musl/src/thread/mipsn32/clone.s",
+"musl/src/thread/mipsn32/syscall_cp.s",
+"musl/src/thread/mtx_destroy.c",
+"musl/src/thread/mtx_init.c",
+"musl/src/thread/mtx_lock.c",
+"musl/src/thread/mtx_timedlock.c",
+"musl/src/thread/mtx_trylock.c",
+"musl/src/thread/mtx_unlock.c",
+"musl/src/thread/or1k/__set_thread_area.s",
+"musl/src/thread/or1k/__unmapself.s",
+"musl/src/thread/or1k/clone.s",
+"musl/src/thread/or1k/syscall_cp.s",
+"musl/src/thread/powerpc/__set_thread_area.s",
+"musl/src/thread/powerpc/__unmapself.s",
+"musl/src/thread/powerpc/clone.s",
+"musl/src/thread/powerpc/syscall_cp.s",
+"musl/src/thread/powerpc64/__set_thread_area.s",
+"musl/src/thread/powerpc64/__unmapself.s",
+"musl/src/thread/powerpc64/clone.s",
+"musl/src/thread/powerpc64/syscall_cp.s",
+"musl/src/thread/pthread_atfork.c",
+"musl/src/thread/pthread_attr_destroy.c",
+"musl/src/thread/pthread_attr_get.c",
+"musl/src/thread/pthread_attr_init.c",
+"musl/src/thread/pthread_attr_setdetachstate.c",
+"musl/src/thread/pthread_attr_setguardsize.c",
+"musl/src/thread/pthread_attr_setinheritsched.c",
+"musl/src/thread/pthread_attr_setschedparam.c",
+"musl/src/thread/pthread_attr_setschedpolicy.c",
+"musl/src/thread/pthread_attr_setscope.c",
+"musl/src/thread/pthread_attr_setstack.c",
+"musl/src/thread/pthread_attr_setstacksize.c",
+"musl/src/thread/pthread_barrier_destroy.c",
+"musl/src/thread/pthread_barrier_init.c",
+"musl/src/thread/pthread_barrier_wait.c",
+"musl/src/thread/pthread_barrierattr_destroy.c",
+"musl/src/thread/pthread_barrierattr_init.c",
+"musl/src/thread/pthread_barrierattr_setpshared.c",
+"musl/src/thread/pthread_cancel.c",
+"musl/src/thread/pthread_cleanup_push.c",
+"musl/src/thread/pthread_cond_broadcast.c",
+"musl/src/thread/pthread_cond_destroy.c",
+"musl/src/thread/pthread_cond_init.c",
+"musl/src/thread/pthread_cond_signal.c",
+"musl/src/thread/pthread_cond_timedwait.c",
+"musl/src/thread/pthread_cond_wait.c",
+"musl/src/thread/pthread_condattr_destroy.c",
+"musl/src/thread/pthread_condattr_init.c",
+"musl/src/thread/pthread_condattr_setclock.c",
+"musl/src/thread/pthread_condattr_setpshared.c",
+"musl/src/thread/pthread_create.c",
+"musl/src/thread/pthread_detach.c",
+"musl/src/thread/pthread_equal.c",
+"musl/src/thread/pthread_getattr_np.c",
+"musl/src/thread/pthread_getconcurrency.c",
+"musl/src/thread/pthread_getcpuclockid.c",
+"musl/src/thread/pthread_getschedparam.c",
+"musl/src/thread/pthread_getspecific.c",
+"musl/src/thread/pthread_join.c",
+"musl/src/thread/pthread_key_create.c",
+"musl/src/thread/pthread_key_delete.c",
+"musl/src/thread/pthread_kill.c",
+"musl/src/thread/pthread_mutex_consistent.c",
+"musl/src/thread/pthread_mutex_destroy.c",
+"musl/src/thread/pthread_mutex_getprioceiling.c",
+"musl/src/thread/pthread_mutex_init.c",
+"musl/src/thread/pthread_mutex_lock.c",
+"musl/src/thread/pthread_mutex_setprioceiling.c",
+"musl/src/thread/pthread_mutex_timedlock.c",
+"musl/src/thread/pthread_mutex_trylock.c",
+"musl/src/thread/pthread_mutex_unlock.c",
+"musl/src/thread/pthread_mutexattr_destroy.c",
+"musl/src/thread/pthread_mutexattr_init.c",
+"musl/src/thread/pthread_mutexattr_setprotocol.c",
+"musl/src/thread/pthread_mutexattr_setpshared.c",
+"musl/src/thread/pthread_mutexattr_setrobust.c",
+"musl/src/thread/pthread_mutexattr_settype.c",
+"musl/src/thread/pthread_once.c",
+"musl/src/thread/pthread_rwlock_destroy.c",
+"musl/src/thread/pthread_rwlock_init.c",
+"musl/src/thread/pthread_rwlock_rdlock.c",
+"musl/src/thread/pthread_rwlock_timedrdlock.c",
+"musl/src/thread/pthread_rwlock_timedwrlock.c",
+"musl/src/thread/pthread_rwlock_tryrdlock.c",
+"musl/src/thread/pthread_rwlock_trywrlock.c",
+"musl/src/thread/pthread_rwlock_unlock.c",
+"musl/src/thread/pthread_rwlock_wrlock.c",
+"musl/src/thread/pthread_rwlockattr_destroy.c",
+"musl/src/thread/pthread_rwlockattr_init.c",
+"musl/src/thread/pthread_rwlockattr_setpshared.c",
+"musl/src/thread/pthread_self.c",
+"musl/src/thread/pthread_setattr_default_np.c",
+"musl/src/thread/pthread_setcancelstate.c",
+"musl/src/thread/pthread_setcanceltype.c",
+"musl/src/thread/pthread_setconcurrency.c",
+"musl/src/thread/pthread_setname_np.c",
+"musl/src/thread/pthread_setschedparam.c",
+"musl/src/thread/pthread_setschedprio.c",
+"musl/src/thread/pthread_setspecific.c",
+"musl/src/thread/pthread_sigmask.c",
+"musl/src/thread/pthread_spin_destroy.c",
+"musl/src/thread/pthread_spin_init.c",
+"musl/src/thread/pthread_spin_lock.c",
+"musl/src/thread/pthread_spin_trylock.c",
+"musl/src/thread/pthread_spin_unlock.c",
+"musl/src/thread/pthread_testcancel.c",
+"musl/src/thread/s390x/__set_thread_area.s",
+"musl/src/thread/s390x/__tls_get_offset.s",
+"musl/src/thread/s390x/__unmapself.s",
+"musl/src/thread/s390x/clone.s",
+"musl/src/thread/s390x/syscall_cp.s",
+"musl/src/thread/sem_destroy.c",
+"musl/src/thread/sem_getvalue.c",
+"musl/src/thread/sem_init.c",
+"musl/src/thread/sem_open.c",
+"musl/src/thread/sem_post.c",
+"musl/src/thread/sem_timedwait.c",
+"musl/src/thread/sem_trywait.c",
+"musl/src/thread/sem_unlink.c",
+"musl/src/thread/sem_wait.c",
+"musl/src/thread/sh/__set_thread_area.c",
+"musl/src/thread/sh/__unmapself.c",
+"musl/src/thread/sh/__unmapself_mmu.s",
+"musl/src/thread/sh/atomics.s",
+"musl/src/thread/sh/clone.s",
+"musl/src/thread/sh/syscall_cp.s",
+"musl/src/thread/synccall.c",
+"musl/src/thread/syscall_cp.c",
+"musl/src/thread/thrd_create.c",
+"musl/src/thread/thrd_exit.c",
+"musl/src/thread/thrd_join.c",
+"musl/src/thread/thrd_sleep.c",
+"musl/src/thread/thrd_yield.c",
+"musl/src/thread/tls.c",
+"musl/src/thread/tss_create.c",
+"musl/src/thread/tss_delete.c",
+"musl/src/thread/tss_set.c",
+"musl/src/thread/vmlock.c",
+"musl/src/thread/x32/__set_thread_area.s",
+"musl/src/thread/x32/__unmapself.s",
+"musl/src/thread/x32/clone.s",
+"musl/src/thread/x32/syscall_cp.s",
+"musl/src/thread/x32/syscall_cp_fixup.c",
+"musl/src/thread/x86_64/__set_thread_area.s",
+"musl/src/thread/x86_64/__unmapself.s",
+"musl/src/thread/x86_64/clone.s",
+"musl/src/thread/x86_64/syscall_cp.s",
+"musl/src/time/__map_file.c",
+"musl/src/time/__month_to_secs.c",
+"musl/src/time/__secs_to_tm.c",
+"musl/src/time/__tm_to_secs.c",
+"musl/src/time/__tz.c",
+"musl/src/time/__year_to_secs.c",
+"musl/src/time/asctime.c",
+"musl/src/time/asctime_r.c",
+"musl/src/time/clock.c",
+"musl/src/time/clock_getcpuclockid.c",
+"musl/src/time/clock_getres.c",
+"musl/src/time/clock_gettime.c",
+"musl/src/time/clock_nanosleep.c",
+"musl/src/time/clock_settime.c",
+"musl/src/time/ctime.c",
+"musl/src/time/ctime_r.c",
+"musl/src/time/difftime.c",
+"musl/src/time/ftime.c",
+"musl/src/time/getdate.c",
+"musl/src/time/gettimeofday.c",
+"musl/src/time/gmtime.c",
+"musl/src/time/gmtime_r.c",
+"musl/src/time/localtime.c",
+"musl/src/time/localtime_r.c",
+"musl/src/time/mktime.c",
+"musl/src/time/nanosleep.c",
+"musl/src/time/strftime.c",
+"musl/src/time/strptime.c",
+"musl/src/time/time.c",
+"musl/src/time/time_impl.h",
+"musl/src/time/timegm.c",
+"musl/src/time/timer_create.c",
+"musl/src/time/timer_delete.c",
+"musl/src/time/timer_getoverrun.c",
+"musl/src/time/timer_gettime.c",
+"musl/src/time/timer_settime.c",
+"musl/src/time/times.c",
+"musl/src/time/timespec_get.c",
+"musl/src/time/utime.c",
+"musl/src/time/wcsftime.c",
+"musl/src/unistd/_exit.c",
+"musl/src/unistd/access.c",
+"musl/src/unistd/acct.c",
+"musl/src/unistd/alarm.c",
+"musl/src/unistd/chdir.c",
+"musl/src/unistd/chown.c",
+"musl/src/unistd/close.c",
+"musl/src/unistd/ctermid.c",
+"musl/src/unistd/dup.c",
+"musl/src/unistd/dup2.c",
+"musl/src/unistd/dup3.c",
+"musl/src/unistd/faccessat.c",
+"musl/src/unistd/fchdir.c",
+"musl/src/unistd/fchown.c",
+"musl/src/unistd/fchownat.c",
+"musl/src/unistd/fdatasync.c",
+"musl/src/unistd/fsync.c",
+"musl/src/unistd/ftruncate.c",
+"musl/src/unistd/getcwd.c",
+"musl/src/unistd/getegid.c",
+"musl/src/unistd/geteuid.c",
+"musl/src/unistd/getgid.c",
+"musl/src/unistd/getgroups.c",
+"musl/src/unistd/gethostname.c",
+"musl/src/unistd/getlogin.c",
+"musl/src/unistd/getlogin_r.c",
+"musl/src/unistd/getpgid.c",
+"musl/src/unistd/getpgrp.c",
+"musl/src/unistd/getpid.c",
+"musl/src/unistd/getppid.c",
+"musl/src/unistd/getsid.c",
+"musl/src/unistd/getuid.c",
+"musl/src/unistd/isatty.c",
+"musl/src/unistd/lchown.c",
+"musl/src/unistd/link.c",
+"musl/src/unistd/linkat.c",
+"musl/src/unistd/lseek.c",
+"musl/src/unistd/mips/pipe.s",
+"musl/src/unistd/mips64/pipe.s",
+"musl/src/unistd/mipsn32/pipe.s",
+"musl/src/unistd/nice.c",
+"musl/src/unistd/pause.c",
+"musl/src/unistd/pipe.c",
+"musl/src/unistd/pipe2.c",
+"musl/src/unistd/posix_close.c",
+"musl/src/unistd/pread.c",
+"musl/src/unistd/preadv.c",
+"musl/src/unistd/pwrite.c",
+"musl/src/unistd/pwritev.c",
+"musl/src/unistd/read.c",
+"musl/src/unistd/readlink.c",
+"musl/src/unistd/readlinkat.c",
+"musl/src/unistd/readv.c",
+"musl/src/unistd/renameat.c",
+"musl/src/unistd/rmdir.c",
+"musl/src/unistd/setegid.c",
+"musl/src/unistd/seteuid.c",
+"musl/src/unistd/setgid.c",
+"musl/src/unistd/setpgid.c",
+"musl/src/unistd/setpgrp.c",
+"musl/src/unistd/setregid.c",
+"musl/src/unistd/setresgid.c",
+"musl/src/unistd/setresuid.c",
+"musl/src/unistd/setreuid.c",
+"musl/src/unistd/setsid.c",
+"musl/src/unistd/setuid.c",
+"musl/src/unistd/setxid.c",
+"musl/src/unistd/sh/pipe.s",
+"musl/src/unistd/sleep.c",
+"musl/src/unistd/symlink.c",
+"musl/src/unistd/symlinkat.c",
+"musl/src/unistd/sync.c",
+"musl/src/unistd/tcgetpgrp.c",
+"musl/src/unistd/tcsetpgrp.c",
+"musl/src/unistd/truncate.c",
+"musl/src/unistd/ttyname.c",
+"musl/src/unistd/ttyname_r.c",
+"musl/src/unistd/ualarm.c",
+"musl/src/unistd/unlink.c",
+"musl/src/unistd/unlinkat.c",
+"musl/src/unistd/usleep.c",
+"musl/src/unistd/write.c",
+"musl/src/unistd/writev.c",
+};
+#endif
diff --git a/src/ir.cpp b/src/ir.cpp
index 94307627a1..5193a63ec4 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15027,9 +15027,10 @@ static IrInstruction *ir_analyze_instruction_export(IrAnalyze *ira, IrInstructio
break;
}
} break;
+ case ZigTypeIdInt:
+ break;
case ZigTypeIdVoid:
case ZigTypeIdBool:
- case ZigTypeIdInt:
case ZigTypeIdFloat:
case ZigTypeIdPointer:
case ZigTypeIdComptimeFloat:
@@ -17128,6 +17129,7 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh
for (size_t i = 0; i < new_incoming_values.length; i += 1) {
IrInstruction *new_value = new_incoming_values.at(i);
IrBasicBlock *predecessor = new_incoming_blocks.at(i);
+ ir_assert(predecessor->instruction_list.length != 0, &phi_instruction->base);
IrInstruction *branch_instruction = predecessor->instruction_list.pop();
ir_set_cursor_at_end(&ira->new_irb, predecessor);
IrInstruction *casted_value = ir_implicit_cast(ira, new_value, resolved_type);
diff --git a/src/link.cpp b/src/link.cpp
index a9e28a0808..4a17ec892c 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -13,6 +13,569 @@
#include "install_files.h"
#include "glibc.hpp"
+static const char *msvcrt_common_src[] = {
+ "misc" OS_SEP "onexit_table.c",
+ "misc" OS_SEP "register_tls_atexit.c",
+ "stdio" OS_SEP "acrt_iob_func.c",
+ "misc" OS_SEP "_configthreadlocale.c",
+ "misc" OS_SEP "_get_current_locale.c",
+ "misc" OS_SEP "invalid_parameter_handler.c",
+ "misc" OS_SEP "output_format.c",
+ "misc" OS_SEP "purecall.c",
+ "secapi" OS_SEP "_access_s.c",
+ "secapi" OS_SEP "_cgets_s.c",
+ "secapi" OS_SEP "_cgetws_s.c",
+ "secapi" OS_SEP "_chsize_s.c",
+ "secapi" OS_SEP "_controlfp_s.c",
+ "secapi" OS_SEP "_cprintf_s.c",
+ "secapi" OS_SEP "_cprintf_s_l.c",
+ "secapi" OS_SEP "_ctime32_s.c",
+ "secapi" OS_SEP "_ctime64_s.c",
+ "secapi" OS_SEP "_cwprintf_s.c",
+ "secapi" OS_SEP "_cwprintf_s_l.c",
+ "secapi" OS_SEP "_gmtime32_s.c",
+ "secapi" OS_SEP "_gmtime64_s.c",
+ "secapi" OS_SEP "_localtime32_s.c",
+ "secapi" OS_SEP "_localtime64_s.c",
+ "secapi" OS_SEP "_mktemp_s.c",
+ "secapi" OS_SEP "_sopen_s.c",
+ "secapi" OS_SEP "_strdate_s.c",
+ "secapi" OS_SEP "_strtime_s.c",
+ "secapi" OS_SEP "_umask_s.c",
+ "secapi" OS_SEP "_vcprintf_s.c",
+ "secapi" OS_SEP "_vcprintf_s_l.c",
+ "secapi" OS_SEP "_vcwprintf_s.c",
+ "secapi" OS_SEP "_vcwprintf_s_l.c",
+ "secapi" OS_SEP "_vscprintf_p.c",
+ "secapi" OS_SEP "_vscwprintf_p.c",
+ "secapi" OS_SEP "_vswprintf_p.c",
+ "secapi" OS_SEP "_waccess_s.c",
+ "secapi" OS_SEP "_wasctime_s.c",
+ "secapi" OS_SEP "_wctime32_s.c",
+ "secapi" OS_SEP "_wctime64_s.c",
+ "secapi" OS_SEP "_wstrtime_s.c",
+ "secapi" OS_SEP "_wmktemp_s.c",
+ "secapi" OS_SEP "_wstrdate_s.c",
+ "secapi" OS_SEP "asctime_s.c",
+ "secapi" OS_SEP "memcpy_s.c",
+ "secapi" OS_SEP "memmove_s.c",
+ "secapi" OS_SEP "rand_s.c",
+ "secapi" OS_SEP "sprintf_s.c",
+ "secapi" OS_SEP "strerror_s.c",
+ "secapi" OS_SEP "vsprintf_s.c",
+ "secapi" OS_SEP "wmemcpy_s.c",
+ "secapi" OS_SEP "wmemmove_s.c",
+ "stdio" OS_SEP "mingw_lock.c",
+};
+
+static const char *msvcrt_i386_src[] = {
+ "misc" OS_SEP "lc_locale_func.c",
+
+};
+
+static const char *msvcrt_other_src[] = {
+ "misc" OS_SEP "__p___argv.c",
+ "misc" OS_SEP "__p__acmdln.c",
+ "misc" OS_SEP "__p__fmode.c",
+ "misc" OS_SEP "__p__wcmdln.c",
+};
+
+static const char *mingwex_generic_src[] = {
+ "complex" OS_SEP "_cabs.c",
+ "complex" OS_SEP "cabs.c",
+ "complex" OS_SEP "cabsf.c",
+ "complex" OS_SEP "cabsl.c",
+ "complex" OS_SEP "cacos.c",
+ "complex" OS_SEP "cacosf.c",
+ "complex" OS_SEP "cacosl.c",
+ "complex" OS_SEP "carg.c",
+ "complex" OS_SEP "cargf.c",
+ "complex" OS_SEP "cargl.c",
+ "complex" OS_SEP "casin.c",
+ "complex" OS_SEP "casinf.c",
+ "complex" OS_SEP "casinl.c",
+ "complex" OS_SEP "catan.c",
+ "complex" OS_SEP "catanf.c",
+ "complex" OS_SEP "catanl.c",
+ "complex" OS_SEP "ccos.c",
+ "complex" OS_SEP "ccosf.c",
+ "complex" OS_SEP "ccosl.c",
+ "complex" OS_SEP "cexp.c",
+ "complex" OS_SEP "cexpf.c",
+ "complex" OS_SEP "cexpl.c",
+ "complex" OS_SEP "cimag.c",
+ "complex" OS_SEP "cimagf.c",
+ "complex" OS_SEP "cimagl.c",
+ "complex" OS_SEP "clog.c",
+ "complex" OS_SEP "clog10.c",
+ "complex" OS_SEP "clog10f.c",
+ "complex" OS_SEP "clog10l.c",
+ "complex" OS_SEP "clogf.c",
+ "complex" OS_SEP "clogl.c",
+ "complex" OS_SEP "conj.c",
+ "complex" OS_SEP "conjf.c",
+ "complex" OS_SEP "conjl.c",
+ "complex" OS_SEP "cpow.c",
+ "complex" OS_SEP "cpowf.c",
+ "complex" OS_SEP "cpowl.c",
+ "complex" OS_SEP "cproj.c",
+ "complex" OS_SEP "cprojf.c",
+ "complex" OS_SEP "cprojl.c",
+ "complex" OS_SEP "creal.c",
+ "complex" OS_SEP "crealf.c",
+ "complex" OS_SEP "creall.c",
+ "complex" OS_SEP "csin.c",
+ "complex" OS_SEP "csinf.c",
+ "complex" OS_SEP "csinl.c",
+ "complex" OS_SEP "csqrt.c",
+ "complex" OS_SEP "csqrtf.c",
+ "complex" OS_SEP "csqrtl.c",
+ "complex" OS_SEP "ctan.c",
+ "complex" OS_SEP "ctanf.c",
+ "complex" OS_SEP "ctanl.c",
+ "crt" OS_SEP "dllentry.c",
+ "crt" OS_SEP "dllmain.c",
+ "gdtoa" OS_SEP "arithchk.c",
+ "gdtoa" OS_SEP "dmisc.c",
+ "gdtoa" OS_SEP "dtoa.c",
+ "gdtoa" OS_SEP "g__fmt.c",
+ "gdtoa" OS_SEP "g_dfmt.c",
+ "gdtoa" OS_SEP "g_ffmt.c",
+ "gdtoa" OS_SEP "g_xfmt.c",
+ "gdtoa" OS_SEP "gdtoa.c",
+ "gdtoa" OS_SEP "gethex.c",
+ "gdtoa" OS_SEP "gmisc.c",
+ "gdtoa" OS_SEP "hd_init.c",
+ "gdtoa" OS_SEP "hexnan.c",
+ "gdtoa" OS_SEP "misc.c",
+ "gdtoa" OS_SEP "qnan.c",
+ "gdtoa" OS_SEP "smisc.c",
+ "gdtoa" OS_SEP "strtodg.c",
+ "gdtoa" OS_SEP "strtodnrp.c",
+ "gdtoa" OS_SEP "strtof.c",
+ "gdtoa" OS_SEP "strtopx.c",
+ "gdtoa" OS_SEP "sum.c",
+ "gdtoa" OS_SEP "ulp.c",
+ "math" OS_SEP "abs64.c",
+ "math" OS_SEP "cbrt.c",
+ "math" OS_SEP "cbrtf.c",
+ "math" OS_SEP "cbrtl.c",
+ "math" OS_SEP "cephes_emath.c",
+ "math" OS_SEP "copysign.c",
+ "math" OS_SEP "copysignf.c",
+ "math" OS_SEP "coshf.c",
+ "math" OS_SEP "coshl.c",
+ "math" OS_SEP "erfl.c",
+ "math" OS_SEP "expf.c",
+ "math" OS_SEP "fabs.c",
+ "math" OS_SEP "fabsf.c",
+ "math" OS_SEP "fabsl.c",
+ "math" OS_SEP "fdim.c",
+ "math" OS_SEP "fdimf.c",
+ "math" OS_SEP "fdiml.c",
+ "math" OS_SEP "fma.c",
+ "math" OS_SEP "fmaf.c",
+ "math" OS_SEP "fmal.c",
+ "math" OS_SEP "fmax.c",
+ "math" OS_SEP "fmaxf.c",
+ "math" OS_SEP "fmaxl.c",
+ "math" OS_SEP "fmin.c",
+ "math" OS_SEP "fminf.c",
+ "math" OS_SEP "fminl.c",
+ "math" OS_SEP "fp_consts.c",
+ "math" OS_SEP "fp_constsf.c",
+ "math" OS_SEP "fp_constsl.c",
+ "math" OS_SEP "fpclassify.c",
+ "math" OS_SEP "fpclassifyf.c",
+ "math" OS_SEP "fpclassifyl.c",
+ "math" OS_SEP "frexpf.c",
+ "math" OS_SEP "hypot.c",
+ "math" OS_SEP "hypotf.c",
+ "math" OS_SEP "hypotl.c",
+ "math" OS_SEP "isnan.c",
+ "math" OS_SEP "isnanf.c",
+ "math" OS_SEP "isnanl.c",
+ "math" OS_SEP "ldexpf.c",
+ "math" OS_SEP "lgamma.c",
+ "math" OS_SEP "lgammaf.c",
+ "math" OS_SEP "lgammal.c",
+ "math" OS_SEP "llrint.c",
+ "math" OS_SEP "llrintf.c",
+ "math" OS_SEP "llrintl.c",
+ "math" OS_SEP "llround.c",
+ "math" OS_SEP "llroundf.c",
+ "math" OS_SEP "llroundl.c",
+ "math" OS_SEP "log10f.c",
+ "math" OS_SEP "logf.c",
+ "math" OS_SEP "lrint.c",
+ "math" OS_SEP "lrintf.c",
+ "math" OS_SEP "lrintl.c",
+ "math" OS_SEP "lround.c",
+ "math" OS_SEP "lroundf.c",
+ "math" OS_SEP "lroundl.c",
+ "math" OS_SEP "modf.c",
+ "math" OS_SEP "modff.c",
+ "math" OS_SEP "modfl.c",
+ "math" OS_SEP "nextafterf.c",
+ "math" OS_SEP "nextafterl.c",
+ "math" OS_SEP "nexttoward.c",
+ "math" OS_SEP "nexttowardf.c",
+ "math" OS_SEP "powf.c",
+ "math" OS_SEP "powi.c",
+ "math" OS_SEP "powif.c",
+ "math" OS_SEP "powil.c",
+ "math" OS_SEP "rint.c",
+ "math" OS_SEP "rintf.c",
+ "math" OS_SEP "rintl.c",
+ "math" OS_SEP "round.c",
+ "math" OS_SEP "roundf.c",
+ "math" OS_SEP "roundl.c",
+ "math" OS_SEP "s_erf.c",
+ "math" OS_SEP "sf_erf.c",
+ "math" OS_SEP "signbit.c",
+ "math" OS_SEP "signbitf.c",
+ "math" OS_SEP "signbitl.c",
+ "math" OS_SEP "signgam.c",
+ "math" OS_SEP "sinhf.c",
+ "math" OS_SEP "sinhl.c",
+ "math" OS_SEP "sqrt.c",
+ "math" OS_SEP "sqrtf.c",
+ "math" OS_SEP "sqrtl.c",
+ "math" OS_SEP "tanhf.c",
+ "math" OS_SEP "tanhl.c",
+ "math" OS_SEP "tgamma.c",
+ "math" OS_SEP "tgammaf.c",
+ "math" OS_SEP "tgammal.c",
+ "math" OS_SEP "truncl.c",
+ "misc" OS_SEP "alarm.c",
+ "misc" OS_SEP "assert.c",
+ "misc" OS_SEP "basename.c",
+ "misc" OS_SEP "btowc.c",
+ "misc" OS_SEP "delay-f.c",
+ "misc" OS_SEP "delay-n.c",
+ "misc" OS_SEP "delayimp.c",
+ "misc" OS_SEP "difftime.c",
+ "misc" OS_SEP "difftime32.c",
+ "misc" OS_SEP "difftime64.c",
+ "misc" OS_SEP "dirent.c",
+ "misc" OS_SEP "dirname.c",
+ "misc" OS_SEP "execv.c",
+ "misc" OS_SEP "execve.c",
+ "misc" OS_SEP "execvp.c",
+ "misc" OS_SEP "execvpe.c",
+ "misc" OS_SEP "feclearexcept.c",
+ "misc" OS_SEP "fegetenv.c",
+ "misc" OS_SEP "fegetexceptflag.c",
+ "misc" OS_SEP "fegetround.c",
+ "misc" OS_SEP "feholdexcept.c",
+ "misc" OS_SEP "feraiseexcept.c",
+ "misc" OS_SEP "fesetenv.c",
+ "misc" OS_SEP "fesetexceptflag.c",
+ "misc" OS_SEP "fesetround.c",
+ "misc" OS_SEP "fetestexcept.c",
+ "misc" OS_SEP "feupdateenv.c",
+ "misc" OS_SEP "ftruncate.c",
+ "misc" OS_SEP "ftw.c",
+ "misc" OS_SEP "ftw64.c",
+ "misc" OS_SEP "fwide.c",
+ "misc" OS_SEP "getlogin.c",
+ "misc" OS_SEP "getopt.c",
+ "misc" OS_SEP "gettimeofday.c",
+ "misc" OS_SEP "imaxabs.c",
+ "misc" OS_SEP "imaxdiv.c",
+ "misc" OS_SEP "isblank.c",
+ "misc" OS_SEP "iswblank.c",
+ "misc" OS_SEP "mbrtowc.c",
+ "misc" OS_SEP "mbsinit.c",
+ "misc" OS_SEP "mempcpy.c",
+ "misc" OS_SEP "mingw-aligned-malloc.c",
+ "misc" OS_SEP "mingw-fseek.c",
+ "misc" OS_SEP "mingw_getsp.S",
+ "misc" OS_SEP "mingw_matherr.c",
+ "misc" OS_SEP "mingw_mbwc_convert.c",
+ "misc" OS_SEP "mingw_usleep.c",
+ "misc" OS_SEP "mingw_wcstod.c",
+ "misc" OS_SEP "mingw_wcstof.c",
+ "misc" OS_SEP "mingw_wcstold.c",
+ "misc" OS_SEP "mkstemp.c",
+ "misc" OS_SEP "seterrno.c",
+ "misc" OS_SEP "sleep.c",
+ "misc" OS_SEP "spawnv.c",
+ "misc" OS_SEP "spawnve.c",
+ "misc" OS_SEP "spawnvp.c",
+ "misc" OS_SEP "spawnvpe.c",
+ "misc" OS_SEP "strnlen.c",
+ "misc" OS_SEP "strsafe.c",
+ "misc" OS_SEP "strtoimax.c",
+ "misc" OS_SEP "strtold.c",
+ "misc" OS_SEP "strtoumax.c",
+ "misc" OS_SEP "tdelete.c",
+ "misc" OS_SEP "tfind.c",
+ "misc" OS_SEP "tsearch.c",
+ "misc" OS_SEP "twalk.c",
+ "misc" OS_SEP "uchar_c16rtomb.c",
+ "misc" OS_SEP "uchar_c32rtomb.c",
+ "misc" OS_SEP "uchar_mbrtoc16.c",
+ "misc" OS_SEP "uchar_mbrtoc32.c",
+ "misc" OS_SEP "wassert.c",
+ "misc" OS_SEP "wcrtomb.c",
+ "misc" OS_SEP "wcsnlen.c",
+ "misc" OS_SEP "wcstof.c",
+ "misc" OS_SEP "wcstoimax.c",
+ "misc" OS_SEP "wcstold.c",
+ "misc" OS_SEP "wcstoumax.c",
+ "misc" OS_SEP "wctob.c",
+ "misc" OS_SEP "wctrans.c",
+ "misc" OS_SEP "wctype.c",
+ "misc" OS_SEP "wdirent.c",
+ "misc" OS_SEP "winbs_uint64.c",
+ "misc" OS_SEP "winbs_ulong.c",
+ "misc" OS_SEP "winbs_ushort.c",
+ "misc" OS_SEP "wmemchr.c",
+ "misc" OS_SEP "wmemcmp.c",
+ "misc" OS_SEP "wmemcpy.c",
+ "misc" OS_SEP "wmemmove.c",
+ "misc" OS_SEP "wmempcpy.c",
+ "misc" OS_SEP "wmemset.c",
+ "stdio" OS_SEP "_Exit.c",
+ "stdio" OS_SEP "_findfirst64i32.c",
+ "stdio" OS_SEP "_findnext64i32.c",
+ "stdio" OS_SEP "_fstat.c",
+ "stdio" OS_SEP "_fstat64i32.c",
+ "stdio" OS_SEP "_ftime.c",
+ "stdio" OS_SEP "_getc_nolock.c",
+ "stdio" OS_SEP "_getwc_nolock.c",
+ "stdio" OS_SEP "_putc_nolock.c",
+ "stdio" OS_SEP "_putwc_nolock.c",
+ "stdio" OS_SEP "_stat.c",
+ "stdio" OS_SEP "_stat64i32.c",
+ "stdio" OS_SEP "_wfindfirst64i32.c",
+ "stdio" OS_SEP "_wfindnext64i32.c",
+ "stdio" OS_SEP "_wstat.c",
+ "stdio" OS_SEP "_wstat64i32.c",
+ "stdio" OS_SEP "asprintf.c",
+ "stdio" OS_SEP "atoll.c",
+ "stdio" OS_SEP "fgetpos64.c",
+ "stdio" OS_SEP "fopen64.c",
+ "stdio" OS_SEP "fseeko32.c",
+ "stdio" OS_SEP "fseeko64.c",
+ "stdio" OS_SEP "fsetpos64.c",
+ "stdio" OS_SEP "ftello.c",
+ "stdio" OS_SEP "ftello64.c",
+ "stdio" OS_SEP "ftruncate64.c",
+ "stdio" OS_SEP "lltoa.c",
+ "stdio" OS_SEP "lltow.c",
+ "stdio" OS_SEP "lseek64.c",
+ "stdio" OS_SEP "mingw_asprintf.c",
+ "stdio" OS_SEP "mingw_fprintf.c",
+ "stdio" OS_SEP "mingw_fprintfw.c",
+ "stdio" OS_SEP "mingw_fscanf.c",
+ "stdio" OS_SEP "mingw_fwscanf.c",
+ "stdio" OS_SEP "mingw_pformat.c",
+ "stdio" OS_SEP "mingw_pformatw.c",
+ "stdio" OS_SEP "mingw_printf.c",
+ "stdio" OS_SEP "mingw_printfw.c",
+ "stdio" OS_SEP "mingw_scanf.c",
+ "stdio" OS_SEP "mingw_snprintf.c",
+ "stdio" OS_SEP "mingw_snprintfw.c",
+ "stdio" OS_SEP "mingw_sprintf.c",
+ "stdio" OS_SEP "mingw_sprintfw.c",
+ "stdio" OS_SEP "mingw_sscanf.c",
+ "stdio" OS_SEP "mingw_swscanf.c",
+ "stdio" OS_SEP "mingw_vasprintf.c",
+ "stdio" OS_SEP "mingw_vfprintf.c",
+ "stdio" OS_SEP "mingw_vfprintfw.c",
+ "stdio" OS_SEP "mingw_vfscanf.c",
+ "stdio" OS_SEP "mingw_vprintf.c",
+ "stdio" OS_SEP "mingw_vprintfw.c",
+ "stdio" OS_SEP "mingw_vsnprintf.c",
+ "stdio" OS_SEP "mingw_vsnprintfw.c",
+ "stdio" OS_SEP "mingw_vsprintf.c",
+ "stdio" OS_SEP "mingw_vsprintfw.c",
+ "stdio" OS_SEP "mingw_wscanf.c",
+ "stdio" OS_SEP "mingw_wvfscanf.c",
+ "stdio" OS_SEP "scanf.S",
+ "stdio" OS_SEP "snprintf.c",
+ "stdio" OS_SEP "snwprintf.c",
+ "stdio" OS_SEP "strtof.c",
+ "stdio" OS_SEP "strtok_r.c",
+ "stdio" OS_SEP "truncate.c",
+ "stdio" OS_SEP "ulltoa.c",
+ "stdio" OS_SEP "ulltow.c",
+ "stdio" OS_SEP "vasprintf.c",
+ "stdio" OS_SEP "vfscanf.c",
+ "stdio" OS_SEP "vfscanf2.S",
+ "stdio" OS_SEP "vfwscanf.c",
+ "stdio" OS_SEP "vfwscanf2.S",
+ "stdio" OS_SEP "vscanf.c",
+ "stdio" OS_SEP "vscanf2.S",
+ "stdio" OS_SEP "vsnprintf.c",
+ "stdio" OS_SEP "vsnwprintf.c",
+ "stdio" OS_SEP "vsscanf.c",
+ "stdio" OS_SEP "vsscanf2.S",
+ "stdio" OS_SEP "vswscanf.c",
+ "stdio" OS_SEP "vswscanf2.S",
+ "stdio" OS_SEP "vwscanf.c",
+ "stdio" OS_SEP "vwscanf2.S",
+ "stdio" OS_SEP "wtoll.c",
+};
+
+static const char *mingwex_x86_src[] = {
+ "math" OS_SEP "x86" OS_SEP "acosf.c",
+ "math" OS_SEP "x86" OS_SEP "acosh.c",
+ "math" OS_SEP "x86" OS_SEP "acoshf.c",
+ "math" OS_SEP "x86" OS_SEP "acoshl.c",
+ "math" OS_SEP "x86" OS_SEP "acosl.c",
+ "math" OS_SEP "x86" OS_SEP "asinf.c",
+ "math" OS_SEP "x86" OS_SEP "asinh.c",
+ "math" OS_SEP "x86" OS_SEP "asinhf.c",
+ "math" OS_SEP "x86" OS_SEP "asinhl.c",
+ "math" OS_SEP "x86" OS_SEP "asinl.c",
+ "math" OS_SEP "x86" OS_SEP "atan2.c",
+ "math" OS_SEP "x86" OS_SEP "atan2f.c",
+ "math" OS_SEP "x86" OS_SEP "atan2l.c",
+ "math" OS_SEP "x86" OS_SEP "atanf.c",
+ "math" OS_SEP "x86" OS_SEP "atanh.c",
+ "math" OS_SEP "x86" OS_SEP "atanhf.c",
+ "math" OS_SEP "x86" OS_SEP "atanhl.c",
+ "math" OS_SEP "x86" OS_SEP "atanl.c",
+ "math" OS_SEP "x86" OS_SEP "ceilf.S",
+ "math" OS_SEP "x86" OS_SEP "ceill.S",
+ "math" OS_SEP "x86" OS_SEP "ceil.S",
+ "math" OS_SEP "x86" OS_SEP "_chgsignl.S",
+ "math" OS_SEP "x86" OS_SEP "copysignl.S",
+ "math" OS_SEP "x86" OS_SEP "cos.c",
+ "math" OS_SEP "x86" OS_SEP "cosf.c",
+ "math" OS_SEP "x86" OS_SEP "cosl.c",
+ "math" OS_SEP "x86" OS_SEP "cosl_internal.S",
+ "math" OS_SEP "x86" OS_SEP "cossin.c",
+ "math" OS_SEP "x86" OS_SEP "exp2f.S",
+ "math" OS_SEP "x86" OS_SEP "exp2l.S",
+ "math" OS_SEP "x86" OS_SEP "exp2.S",
+ "math" OS_SEP "x86" OS_SEP "exp.c",
+ "math" OS_SEP "x86" OS_SEP "expl.c",
+ "math" OS_SEP "x86" OS_SEP "expm1.c",
+ "math" OS_SEP "x86" OS_SEP "expm1f.c",
+ "math" OS_SEP "x86" OS_SEP "expm1l.c",
+ "math" OS_SEP "x86" OS_SEP "floorf.S",
+ "math" OS_SEP "x86" OS_SEP "floorl.S",
+ "math" OS_SEP "x86" OS_SEP "floor.S",
+ "math" OS_SEP "x86" OS_SEP "fmod.c",
+ "math" OS_SEP "x86" OS_SEP "fmodf.c",
+ "math" OS_SEP "x86" OS_SEP "fmodl.c",
+ "math" OS_SEP "x86" OS_SEP "frexpl.S",
+ "math" OS_SEP "x86" OS_SEP "fucom.c",
+ "math" OS_SEP "x86" OS_SEP "ilogbf.S",
+ "math" OS_SEP "x86" OS_SEP "ilogbl.S",
+ "math" OS_SEP "x86" OS_SEP "ilogb.S",
+ "math" OS_SEP "x86" OS_SEP "internal_logl.S",
+ "math" OS_SEP "x86" OS_SEP "ldexp.c",
+ "math" OS_SEP "x86" OS_SEP "ldexpl.c",
+ "math" OS_SEP "x86" OS_SEP "log10l.S",
+ "math" OS_SEP "x86" OS_SEP "log1pf.S",
+ "math" OS_SEP "x86" OS_SEP "log1pl.S",
+ "math" OS_SEP "x86" OS_SEP "log1p.S",
+ "math" OS_SEP "x86" OS_SEP "log2f.S",
+ "math" OS_SEP "x86" OS_SEP "log2l.S",
+ "math" OS_SEP "x86" OS_SEP "log2.S",
+ "math" OS_SEP "x86" OS_SEP "logb.c",
+ "math" OS_SEP "x86" OS_SEP "logbf.c",
+ "math" OS_SEP "x86" OS_SEP "logbl.c",
+ "math" OS_SEP "x86" OS_SEP "log.c",
+ "math" OS_SEP "x86" OS_SEP "logl.c",
+ "math" OS_SEP "x86" OS_SEP "nearbyintf.S",
+ "math" OS_SEP "x86" OS_SEP "nearbyintl.S",
+ "math" OS_SEP "x86" OS_SEP "nearbyint.S",
+ "math" OS_SEP "x86" OS_SEP "pow.c",
+ "math" OS_SEP "x86" OS_SEP "powl.c",
+ "math" OS_SEP "x86" OS_SEP "remainderf.S",
+ "math" OS_SEP "x86" OS_SEP "remainderl.S",
+ "math" OS_SEP "x86" OS_SEP "remainder.S",
+ "math" OS_SEP "x86" OS_SEP "remquof.S",
+ "math" OS_SEP "x86" OS_SEP "remquol.S",
+ "math" OS_SEP "x86" OS_SEP "remquo.S",
+ "math" OS_SEP "x86" OS_SEP "scalbnf.S",
+ "math" OS_SEP "x86" OS_SEP "scalbnl.S",
+ "math" OS_SEP "x86" OS_SEP "scalbn.S",
+ "math" OS_SEP "x86" OS_SEP "sin.c",
+ "math" OS_SEP "x86" OS_SEP "sinf.c",
+ "math" OS_SEP "x86" OS_SEP "sinl.c",
+ "math" OS_SEP "x86" OS_SEP "sinl_internal.S",
+ "math" OS_SEP "x86" OS_SEP "tanf.c",
+ "math" OS_SEP "x86" OS_SEP "tanl.S",
+ "math" OS_SEP "x86" OS_SEP "truncf.S",
+ "math" OS_SEP "x86" OS_SEP "trunc.S",
+};
+
+static const char *mingwex_arm32_src[] = {
+ "math" OS_SEP "arm" OS_SEP "_chgsignl.S",
+ "math" OS_SEP "arm" OS_SEP "ceil.S",
+ "math" OS_SEP "arm" OS_SEP "ceilf.S",
+ "math" OS_SEP "arm" OS_SEP "ceill.S",
+ "math" OS_SEP "arm" OS_SEP "copysignl.c",
+ "math" OS_SEP "arm" OS_SEP "exp2.c",
+ "math" OS_SEP "arm" OS_SEP "floor.S",
+ "math" OS_SEP "arm" OS_SEP "floorf.S",
+ "math" OS_SEP "arm" OS_SEP "floorl.S",
+ "math" OS_SEP "arm" OS_SEP "ldexpl.c",
+ "math" OS_SEP "arm" OS_SEP "log2.c",
+ "math" OS_SEP "arm" OS_SEP "nearbyint.S",
+ "math" OS_SEP "arm" OS_SEP "nearbyintf.S",
+ "math" OS_SEP "arm" OS_SEP "nearbyintl.S",
+ "math" OS_SEP "arm" OS_SEP "scalbn.c",
+ "math" OS_SEP "arm" OS_SEP "sincos.c",
+ "math" OS_SEP "arm" OS_SEP "trunc.S",
+ "math" OS_SEP "arm" OS_SEP "truncf.S",
+};
+
+static const char *mingwex_arm64_src[] = {
+ "math" OS_SEP "arm64" OS_SEP "ceilf.S",
+ "math" OS_SEP "arm64" OS_SEP "ceill.S",
+ "math" OS_SEP "arm64" OS_SEP "ceil.S",
+ "math" OS_SEP "arm64" OS_SEP "_chgsignl.S",
+ "math" OS_SEP "arm64" OS_SEP "copysignl.c",
+ "math" OS_SEP "arm64" OS_SEP "exp2f.S",
+ "math" OS_SEP "arm64" OS_SEP "exp2.S",
+ "math" OS_SEP "arm64" OS_SEP "floorf.S",
+ "math" OS_SEP "arm64" OS_SEP "floorl.S",
+ "math" OS_SEP "arm64" OS_SEP "floor.S",
+ "math" OS_SEP "arm64" OS_SEP "ldexpl.c",
+ "math" OS_SEP "arm64" OS_SEP "log2.c",
+ "math" OS_SEP "arm64" OS_SEP "nearbyintf.S",
+ "math" OS_SEP "arm64" OS_SEP "nearbyintl.S",
+ "math" OS_SEP "arm64" OS_SEP "nearbyint.S",
+ "math" OS_SEP "arm64" OS_SEP "scalbn.c",
+ "math" OS_SEP "arm64" OS_SEP "sincos.c",
+ "math" OS_SEP "arm64" OS_SEP "truncf.S",
+ "math" OS_SEP "arm64" OS_SEP "trunc.S",
+};
+
+struct MinGWDef {
+ const char *name;
+ const char *path;
+ bool always_link;
+};
+static const MinGWDef mingw_def_list[] = {
+ {"msvcrt", "lib-common" OS_SEP "msvcrt.def.in", true},
+ {"setupapi", "libarm32" OS_SEP "setupapi.def", false},
+ {"setupapi", "libarm64" OS_SEP "setupapi.def", false},
+ {"setupapi", "lib32" OS_SEP "setupapi.def", false},
+ {"setupapi", "lib64" OS_SEP "setupapi.def", false},
+ {"winmm", "lib-common" OS_SEP "winmm.def", false},
+ {"gdi32", "lib-common" OS_SEP "gdi32.def", false},
+ {"imm32", "lib-common" OS_SEP "imm32.def", false},
+ {"version", "lib-common" OS_SEP "version.def", false},
+ {"advapi32", "lib-common" OS_SEP "advapi32.def.in", true},
+ {"oleaut32", "lib-common" OS_SEP "oleaut32.def.in", false},
+ {"ole32", "lib-common" OS_SEP "ole32.def.in", false},
+ {"shell32", "lib-common" OS_SEP "shell32.def", true},
+ {"user32", "lib-common" OS_SEP "user32.def.in", true},
+ {"kernel32", "lib-common" OS_SEP "kernel32.def.in", true},
+ {"ntdll", "libarm32" OS_SEP "ntdll.def", true},
+ {"ntdll", "lib32" OS_SEP "ntdll.def", true},
+ {"ntdll", "lib64" OS_SEP "ntdll.def", true},
+};
+
struct LinkJob {
CodeGen *codegen;
ZigList<const char *> args;
@@ -108,6 +671,29 @@ static const char *build_libunwind(CodeGen *parent) {
return buf_ptr(&child_gen->output_file_path);
}
+static void mingw_add_cc_args(CodeGen *parent, CFile *c_file) {
+ c_file->args.append("-DHAVE_CONFIG_H");
+
+ c_file->args.append("-I");
+ c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "include",
+ buf_ptr(parent->zig_lib_dir))));
+
+ c_file->args.append("-isystem");
+ c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "any-windows-any",
+ buf_ptr(parent->zig_lib_dir))));
+
+ if (target_is_arm(parent->zig_target) &&
+ target_arch_pointer_bit_width(parent->zig_target->arch) == 32)
+ {
+ c_file->args.append("-mfpu=vfp");
+ }
+
+ c_file->args.append("-std=gnu11");
+ c_file->args.append("-D_CRTBLD");
+ c_file->args.append("-D_WIN32_WINNT=0x0f00");
+ c_file->args.append("-D__MSVCRT_VERSION__=0x700");
+}
+
static void glibc_add_include_dirs_arch(CFile *c_file, ZigLLVM_ArchType arch, const char *nptl, const char *dir) {
bool is_x86 = arch == ZigLLVM_x86 || arch == ZigLLVM_x86_64;
bool is_aarch64 = arch == ZigLLVM_aarch64 || arch == ZigLLVM_aarch64_be;
@@ -549,9 +1135,183 @@ static const char *build_musl(CodeGen *parent) {
return buf_ptr(&child_gen->output_file_path);
}
+static void add_msvcrt_os_dep(CodeGen *parent, CodeGen *child_gen, const char *src_path) {
+ CFile *c_file = allocate<CFile>(1);
+ c_file->source_path = buf_ptr(buf_sprintf("%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "%s",
+ buf_ptr(parent->zig_lib_dir), src_path));
+ c_file->args.append("-DHAVE_CONFIG_H");
+ c_file->args.append("-D__LIBMSVCRT__");
+
+ c_file->args.append("-I");
+ c_file->args.append(path_from_libc(parent, "mingw" OS_SEP "include"));
+
+ c_file->args.append("-std=gnu99");
+ c_file->args.append("-D_CRTBLD");
+ c_file->args.append("-D_WIN32_WINNT=0x0f00");
+ c_file->args.append("-D__MSVCRT_VERSION__=0x700");
+
+ c_file->args.append("-isystem");
+ c_file->args.append(path_from_libc(parent, "include" OS_SEP "any-windows-any"));
+
+ c_file->args.append("-g");
+ c_file->args.append("-O2");
+
+ child_gen->c_source_files.append(c_file);
+}
+
+static void add_mingwex_os_dep(CodeGen *parent, CodeGen *child_gen, const char *src_path) {
+ CFile *c_file = allocate<CFile>(1);
+ c_file->source_path = buf_ptr(buf_sprintf("%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "%s",
+ buf_ptr(parent->zig_lib_dir), src_path));
+ c_file->args.append("-DHAVE_CONFIG_H");
+
+ c_file->args.append("-I");
+ c_file->args.append(path_from_libc(parent, "mingw"));
+
+ c_file->args.append("-I");
+ c_file->args.append(path_from_libc(parent, "mingw" OS_SEP "include"));
+
+ c_file->args.append("-std=gnu99");
+ c_file->args.append("-D_CRTBLD");
+ c_file->args.append("-D_WIN32_WINNT=0x0f00");
+ c_file->args.append("-D__MSVCRT_VERSION__=0x700");
+ c_file->args.append("-g");
+ c_file->args.append("-O2");
+
+ c_file->args.append("-isystem");
+ c_file->args.append(path_from_libc(parent, "include" OS_SEP "any-windows-any"));
+
+ child_gen->c_source_files.append(c_file);
+}
static const char *get_libc_crt_file(CodeGen *parent, const char *file) {
- if (parent->libc == nullptr && target_is_glibc(parent->zig_target)) {
+ if (parent->libc == nullptr && parent->zig_target->os == OsWindows) {
+ if (strcmp(file, "crt2.o") == 0) {
+ CFile *c_file = allocate<CFile>(1);
+ c_file->source_path = buf_ptr(buf_sprintf(
+ "%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "crt" OS_SEP "crtexe.c", buf_ptr(parent->zig_lib_dir)));
+ mingw_add_cc_args(parent, c_file);
+ c_file->args.append("-U__CRTDLL__");
+ c_file->args.append("-D__MSVCRT__");
+ // Uncomment these 3 things for crtu
+ //c_file->args.append("-DUNICODE");
+ //c_file->args.append("-D_UNICODE");
+ //c_file->args.append("-DWPRFLAG=1");
+ return build_libc_object(parent, "crt2", c_file);
+ } else if (strcmp(file, "dllcrt2.o") == 0) {
+ CFile *c_file = allocate<CFile>(1);
+ c_file->source_path = buf_ptr(buf_sprintf(
+ "%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "crt" OS_SEP "crtdll.c", buf_ptr(parent->zig_lib_dir)));
+ mingw_add_cc_args(parent, c_file);
+ c_file->args.append("-U__CRTDLL__");
+ c_file->args.append("-D__MSVCRT__");
+ return build_libc_object(parent, "dllcrt2", c_file);
+ } else if (strcmp(file, "mingw32.lib") == 0) {
+ CodeGen *child_gen = create_child_codegen(parent, nullptr, OutTypeLib, nullptr);
+ codegen_set_out_name(child_gen, buf_create_from_str("mingw32"));
+
+ static const char *deps[] = {
+ "mingw" OS_SEP "crt" OS_SEP "crt0_c.c",
+ "mingw" OS_SEP "crt" OS_SEP "dll_argv.c",
+ "mingw" OS_SEP "crt" OS_SEP "gccmain.c",
+ "mingw" OS_SEP "crt" OS_SEP "natstart.c",
+ "mingw" OS_SEP "crt" OS_SEP "pseudo-reloc-list.c",
+ "mingw" OS_SEP "crt" OS_SEP "wildcard.c",
+ "mingw" OS_SEP "crt" OS_SEP "charmax.c",
+ "mingw" OS_SEP "crt" OS_SEP "crt0_w.c",
+ "mingw" OS_SEP "crt" OS_SEP "dllargv.c",
+ "mingw" OS_SEP "crt" OS_SEP "gs_support.c",
+ "mingw" OS_SEP "crt" OS_SEP "_newmode.c",
+ "mingw" OS_SEP "crt" OS_SEP "tlssup.c",
+ "mingw" OS_SEP "crt" OS_SEP "xncommod.c",
+ "mingw" OS_SEP "crt" OS_SEP "cinitexe.c",
+ "mingw" OS_SEP "crt" OS_SEP "merr.c",
+ "mingw" OS_SEP "crt" OS_SEP "pesect.c",
+ "mingw" OS_SEP "crt" OS_SEP "udllargc.c",
+ "mingw" OS_SEP "crt" OS_SEP "xthdloc.c",
+ "mingw" OS_SEP "crt" OS_SEP "CRT_fp10.c",
+ "mingw" OS_SEP "crt" OS_SEP "mingw_helpers.c",
+ "mingw" OS_SEP "crt" OS_SEP "pseudo-reloc.c",
+ "mingw" OS_SEP "crt" OS_SEP "udll_argv.c",
+ "mingw" OS_SEP "crt" OS_SEP "xtxtmode.c",
+ "mingw" OS_SEP "crt" OS_SEP "crt_handler.c",
+ "mingw" OS_SEP "crt" OS_SEP "tlsthrd.c",
+ "mingw" OS_SEP "crt" OS_SEP "tlsmthread.c",
+ "mingw" OS_SEP "crt" OS_SEP "tlsmcrt.c",
+ "mingw" OS_SEP "crt" OS_SEP "cxa_atexit.c",
+ };
+ for (size_t i = 0; i < array_length(deps); i += 1) {
+ CFile *c_file = allocate<CFile>(1);
+ c_file->source_path = path_from_libc(parent, deps[i]);
+ c_file->args.append("-DHAVE_CONFIG_H");
+ c_file->args.append("-D_SYSCRT=1");
+ c_file->args.append("-DCRTDLL=1");
+
+ c_file->args.append("-isystem");
+ c_file->args.append(path_from_libc(parent, "include" OS_SEP "any-windows-any"));
+
+ c_file->args.append("-isystem");
+ c_file->args.append(path_from_libc(parent, "mingw" OS_SEP "include"));
+
+ c_file->args.append("-std=gnu99");
+ c_file->args.append("-D_CRTBLD");
+ c_file->args.append("-D_WIN32_WINNT=0x0f00");
+ c_file->args.append("-D__MSVCRT_VERSION__=0x700");
+ c_file->args.append("-g");
+ c_file->args.append("-O2");
+
+ child_gen->c_source_files.append(c_file);
+ }
+ codegen_build_and_link(child_gen);
+ return buf_ptr(&child_gen->output_file_path);
+ } else if (strcmp(file, "msvcrt-os.lib") == 0) {
+ CodeGen *child_gen = create_child_codegen(parent, nullptr, OutTypeLib, nullptr);
+ codegen_set_out_name(child_gen, buf_create_from_str("msvcrt-os"));
+
+ for (size_t i = 0; i < array_length(msvcrt_common_src); i += 1) {
+ add_msvcrt_os_dep(parent, child_gen, msvcrt_common_src[i]);
+ }
+ if (parent->zig_target->arch == ZigLLVM_x86) {
+ for (size_t i = 0; i < array_length(msvcrt_i386_src); i += 1) {
+ add_msvcrt_os_dep(parent, child_gen, msvcrt_i386_src[i]);
+ }
+ } else {
+ for (size_t i = 0; i < array_length(msvcrt_other_src); i += 1) {
+ add_msvcrt_os_dep(parent, child_gen, msvcrt_other_src[i]);
+ }
+ }
+ codegen_build_and_link(child_gen);
+ return buf_ptr(&child_gen->output_file_path);
+ } else if (strcmp(file, "mingwex.lib") == 0) {
+ CodeGen *child_gen = create_child_codegen(parent, nullptr, OutTypeLib, nullptr);
+ codegen_set_out_name(child_gen, buf_create_from_str("mingwex"));
+
+ for (size_t i = 0; i < array_length(mingwex_generic_src); i += 1) {
+ add_mingwex_os_dep(parent, child_gen, mingwex_generic_src[i]);
+ }
+ if (parent->zig_target->arch == ZigLLVM_x86 || parent->zig_target->arch == ZigLLVM_x86_64) {
+ for (size_t i = 0; i < array_length(mingwex_x86_src); i += 1) {
+ add_mingwex_os_dep(parent, child_gen, mingwex_x86_src[i]);
+ }
+ } else if (target_is_arm(parent->zig_target)) {
+ if (target_arch_pointer_bit_width(parent->zig_target->arch) == 32) {
+ for (size_t i = 0; i < array_length(mingwex_arm32_src); i += 1) {
+ add_mingwex_os_dep(parent, child_gen, mingwex_arm32_src[i]);
+ }
+ } else {
+ for (size_t i = 0; i < array_length(mingwex_arm64_src); i += 1) {
+ add_mingwex_os_dep(parent, child_gen, mingwex_arm64_src[i]);
+ }
+ }
+ } else {
+ zig_unreachable();
+ }
+ codegen_build_and_link(child_gen);
+ return buf_ptr(&child_gen->output_file_path);
+ } else {
+ zig_unreachable();
+ }
+ } else if (parent->libc == nullptr && target_is_glibc(parent->zig_target)) {
if (strcmp(file, "crti.o") == 0) {
CFile *c_file = allocate<CFile>(1);
c_file->source_path = glibc_start_asm_path(parent, "crti.S");
@@ -750,6 +1510,7 @@ static Buf *build_a_raw(CodeGen *parent_gen, const char *aname, Buf *full_path,
}
child_gen->function_sections = true;
+ child_gen->want_stack_check = WantStackCheckDisabled;
codegen_build_and_link(child_gen);
return &child_gen->output_file_path;
@@ -1110,8 +1871,12 @@ static void coff_append_machine_arg(CodeGen *g, ZigList<const char *> *list) {
list->append("-MACHINE:X86");
} else if (g->zig_target->arch == ZigLLVM_x86_64) {
list->append("-MACHINE:X64");
- } else if (g->zig_target->arch == ZigLLVM_arm) {
- list->append("-MACHINE:ARM");
+ } else if (target_is_arm(g->zig_target)) {
+ if (target_arch_pointer_bit_width(g->zig_target->arch) == 32) {
+ list->append("-MACHINE:ARM");
+ } else {
+ list->append("-MACHINE:ARM64");
+ }
}
}
@@ -1166,21 +1931,161 @@ static void add_msvc_link_args(LinkJob *lj, bool is_library) {
lj->args.append("ntdll.lib");
}
-static const char *get_libc_file(ZigLibCInstallation *lib, const char *file) {
- Buf *out_buf = buf_alloc();
- os_path_join(&lib->crt_dir, buf_create_from_str(file), out_buf);
- return buf_ptr(out_buf);
+static void print_zig_cc_cmd(ZigList<const char *> *args) {
+ for (size_t arg_i = 0; arg_i < args->length; arg_i += 1) {
+ const char *space_str = (arg_i == 0) ? "" : " ";
+ fprintf(stderr, "%s%s", space_str, args->at(arg_i));
+ }
+ fprintf(stderr, "\n");
}
-static const char *get_libc_static_file(ZigLibCInstallation *lib, const char *file) {
- Buf *out_buf = buf_alloc();
- os_path_join(&lib->static_crt_dir, buf_create_from_str(file), out_buf);
- return buf_ptr(out_buf);
+static const char *get_def_lib(CodeGen *parent, const char *name, Buf *def_in_rel_path) {
+ Error err;
+
+ Buf *self_exe_path = buf_alloc();
+ if ((err = os_self_exe_path(self_exe_path))) {
+ fprintf(stderr, "Unable to get self exe path: %s\n", err_str(err));
+ exit(1);
+ }
+ Buf *compiler_id;
+ if ((err = get_compiler_id(&compiler_id))) {
+ fprintf(stderr, "Unable to get compiler id: %s\n", err_str(err));
+ exit(1);
+ }
+
+ Buf *cache_dir = get_stage1_cache_path();
+ Buf *o_dir = buf_sprintf("%s" OS_SEP CACHE_OUT_SUBDIR, buf_ptr(cache_dir));
+ Buf *manifest_dir = buf_sprintf("%s" OS_SEP CACHE_HASH_SUBDIR, buf_ptr(cache_dir));
+
+ Buf *def_in_file = buf_sprintf("%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "%s",
+ buf_ptr(parent->zig_lib_dir), buf_ptr(def_in_rel_path));
+ Buf *def_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "mingw" OS_SEP "def-include",
+ buf_ptr(parent->zig_lib_dir));
+
+ CacheHash *cache_hash = allocate<CacheHash>(1);
+ cache_init(cache_hash, manifest_dir);
+
+ cache_buf(cache_hash, compiler_id);
+ cache_file(cache_hash, def_in_file);
+ cache_buf(cache_hash, def_include_dir);
+ cache_int(cache_hash, parent->zig_target->arch);
+
+ Buf digest = BUF_INIT;
+ buf_resize(&digest, 0);
+ if ((err = cache_hit(cache_hash, &digest))) {
+ if (err != ErrorInvalidFormat) {
+ if (err == ErrorCacheUnavailable) {
+ // already printed error
+ } else {
+ fprintf(stderr, "unable to check cache when processing .def.in file: %s\n", err_str(err));
+ }
+ exit(1);
+ }
+ }
+
+ Buf *artifact_dir;
+ Buf *lib_final_path;
+ Buf *final_lib_basename = buf_sprintf("%s.lib", name);
+
+ bool is_cache_miss = (buf_len(&digest) == 0);
+ if (is_cache_miss) {
+ if ((err = cache_final(cache_hash, &digest))) {
+ fprintf(stderr, "Unable to finalize cache hash: %s\n", err_str(err));
+ exit(1);
+ }
+ artifact_dir = buf_alloc();
+ os_path_join(o_dir, &digest, artifact_dir);
+ if ((err = os_make_path(artifact_dir))) {
+ fprintf(stderr, "Unable to create output directory '%s': %s",
+ buf_ptr(artifact_dir), err_str(err));
+ exit(1);
+ }
+ Buf *final_def_basename = buf_sprintf("%s.def", name);
+ Buf *def_final_path = buf_alloc();
+ os_path_join(artifact_dir, final_def_basename, def_final_path);
+
+ ZigList<const char *> args = {};
+ args.append(buf_ptr(self_exe_path));
+ args.append("cc");
+ args.append("-x");
+ args.append("c");
+ args.append(buf_ptr(def_in_file));
+ args.append("-Wp,-w");
+ args.append("-undef");
+ args.append("-P");
+ args.append("-I");
+ args.append(buf_ptr(def_include_dir));
+ if (target_is_arm(parent->zig_target)) {
+ if (target_arch_pointer_bit_width(parent->zig_target->arch) == 32) {
+ args.append("-DDEF_ARM32");
+ } else {
+ args.append("-DDEF_ARM64");
+ }
+ } else if (parent->zig_target->arch == ZigLLVM_x86) {
+ args.append("-DDEF_I386");
+ } else if (parent->zig_target->arch == ZigLLVM_x86_64) {
+ args.append("-DDEF_X64");
+ } else {
+ zig_unreachable();
+ }
+ args.append("-E");
+ args.append("-o");
+ args.append(buf_ptr(def_final_path));
+
+ if (parent->verbose_cc) {
+ print_zig_cc_cmd(&args);
+ }
+ Termination term;
+ os_spawn_process(args, &term);
+ if (term.how != TerminationIdClean || term.code != 0) {
+ fprintf(stderr, "\nThe following command failed:\n");
+ print_zig_cc_cmd(&args);
+ exit(1);
+ }
+
+ lib_final_path = buf_alloc();
+ os_path_join(artifact_dir, final_lib_basename, lib_final_path);
+
+ args.resize(0);
+ args.append("link");
+ coff_append_machine_arg(parent, &args);
+
+ args.append(buf_ptr(buf_sprintf("-DEF:%s", buf_ptr(def_final_path))));
+ args.append(buf_ptr(buf_sprintf("-OUT:%s", buf_ptr(lib_final_path))));
+
+ Buf diag = BUF_INIT;
+ ZigLLVM_ObjectFormatType target_ofmt = target_object_format(parent->zig_target);
+ if (!zig_lld_link(target_ofmt, args.items, args.length, &diag)) {
+ fprintf(stderr, "%s\n", buf_ptr(&diag));
+ exit(1);
+ }
+ } else {
+ // cache hit
+ artifact_dir = buf_alloc();
+ os_path_join(o_dir, &digest, artifact_dir);
+ lib_final_path = buf_alloc();
+ os_path_join(artifact_dir, final_lib_basename, lib_final_path);
+ }
+ parent->caches_to_release.append(cache_hash);
+
+ return buf_ptr(lib_final_path);
+}
+
+static bool is_linking_system_lib(CodeGen *g, const char *name) {
+ for (size_t lib_i = 0; lib_i < g->link_libs_list.length; lib_i += 1) {
+ LinkLib *link_lib = g->link_libs_list.at(lib_i);
+ if (buf_eql_str(link_lib->name, name)) {
+ return true;
+ }
+ }
+ return false;
}
static void add_mingw_link_args(LinkJob *lj, bool is_library) {
CodeGen *g = lj->codegen;
+ lj->args.append("-lldmingw");
+
bool is_dll = g->out_type == OutTypeLib && g->is_dynamic;
if (g->zig_target->arch == ZigLLVM_x86) {
@@ -1190,45 +2095,43 @@ static void add_mingw_link_args(LinkJob *lj, bool is_library) {
}
if (is_dll) {
- lj->args.append(get_libc_file(g->libc, "dllcrt2.o"));
- } else {
- lj->args.append(get_libc_file(g->libc, "crt2.o"));
- }
-
- lj->args.append(get_libc_static_file(g->libc, "crtbegin.o"));
-
- lj->args.append(get_libc_file(g->libc, "libmingw32.a"));
-
- if (is_dll) {
- lj->args.append(get_libc_static_file(g->libc, "libgcc_s.a"));
- lj->args.append(get_libc_static_file(g->libc, "libgcc.a"));
+ lj->args.append(get_libc_crt_file(g, "dllcrt2.o"));
} else {
- lj->args.append(get_libc_static_file(g->libc, "libgcc.a"));
- lj->args.append(get_libc_static_file(g->libc, "libgcc_eh.a"));
- }
-
- lj->args.append(get_libc_static_file(g->libc, "libssp.a"));
- lj->args.append(get_libc_file(g->libc, "libmoldname.a"));
- lj->args.append(get_libc_file(g->libc, "libmingwex.a"));
- lj->args.append(get_libc_file(g->libc, "libmsvcrt.a"));
-
- if (detect_subsystem(g) == TargetSubsystemWindows) {
- lj->args.append(get_libc_file(g->libc, "libgdi32.a"));
- lj->args.append(get_libc_file(g->libc, "libcomdlg32.a"));
+ lj->args.append(get_libc_crt_file(g, "crt2.o"));
+ }
+
+ lj->args.append(get_libc_crt_file(g, "mingw32.lib"));
+ lj->args.append(get_libc_crt_file(g, "mingwex.lib"));
+ lj->args.append(get_libc_crt_file(g, "msvcrt-os.lib"));
+
+ for (size_t def_i = 0; def_i < array_length(mingw_def_list); def_i += 1) {
+ const char *name = mingw_def_list[def_i].name;
+ Buf *path = buf_create_from_str(mingw_def_list[def_i].path);
+ bool always_link = mingw_def_list[def_i].always_link;
+ bool is_this_arch = false;
+ if (buf_starts_with_str(path, "lib-common" OS_SEP)) {
+ is_this_arch = true;
+ } else if (target_is_arm(g->zig_target)) {
+ if (target_arch_pointer_bit_width(g->zig_target->arch) == 32) {
+ is_this_arch = buf_starts_with_str(path, "libarm32" OS_SEP);
+ } else {
+ is_this_arch = buf_starts_with_str(path, "libarm64" OS_SEP);
+ }
+ } else if (g->zig_target->arch == ZigLLVM_x86) {
+ is_this_arch = buf_starts_with_str(path, "lib32" OS_SEP);
+ } else if (g->zig_target->arch == ZigLLVM_x86_64) {
+ is_this_arch = buf_starts_with_str(path, "lib64" OS_SEP);
+ }
+ if (is_this_arch && (always_link || is_linking_system_lib(g, name))) {
+ lj->args.append(get_def_lib(g, name, path));
+ }
}
-
- lj->args.append(get_libc_file(g->libc, "libadvapi32.a"));
- lj->args.append(get_libc_file(g->libc, "libadvapi32.a"));
- lj->args.append(get_libc_file(g->libc, "libshell32.a"));
- lj->args.append(get_libc_file(g->libc, "libuser32.a"));
- lj->args.append(get_libc_file(g->libc, "libkernel32.a"));
-
- lj->args.append(get_libc_static_file(g->libc, "crtend.o"));
}
-static void add_win_link_args(LinkJob *lj, bool is_library) {
+static void add_win_link_args(LinkJob *lj, bool is_library, bool *have_windows_dll_import_libs) {
if (lj->link_in_crt) {
if (target_abi_is_gnu(lj->codegen->zig_target->abi)) {
+ *have_windows_dll_import_libs = true;
add_mingw_link_args(lj, is_library);
} else {
add_msvc_link_args(lj, is_library);
@@ -1245,6 +2148,14 @@ static void add_win_link_args(LinkJob *lj, bool is_library) {
}
}
+static bool is_mingw_link_lib(Buf *name) {
+ for (size_t def_i = 0; def_i < array_length(mingw_def_list); def_i += 1) {
+ if (buf_eql_str_ignore_case(name, mingw_def_list[def_i].name)) {
+ return true;
+ }
+ }
+ return false;
+}
static void construct_linker_job_coff(LinkJob *lj) {
Error err;
CodeGen *g = lj->codegen;
@@ -1271,9 +2182,7 @@ static void construct_linker_job_coff(LinkJob *lj) {
lj->args.append(buf_ptr(buf_sprintf("-OUT:%s", buf_ptr(&g->output_file_path))));
- if (g->libc_link_lib != nullptr) {
- assert(g->libc != nullptr);
-
+ if (g->libc_link_lib != nullptr && g->libc != nullptr) {
lj->args.append(buf_ptr(buf_sprintf("-LIBPATH:%s", buf_ptr(&g->libc->crt_dir))));
if (target_abi_is_gnu(g->zig_target->abi)) {
@@ -1294,17 +2203,18 @@ static void construct_linker_job_coff(LinkJob *lj) {
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
}
+ bool have_windows_dll_import_libs = false;
switch (detect_subsystem(g)) {
case TargetSubsystemAuto:
if (g->zig_target->os == OsUefi) {
add_uefi_link_args(lj);
} else {
- add_win_link_args(lj, is_library);
+ add_win_link_args(lj, is_library, &have_windows_dll_import_libs);
}
break;
case TargetSubsystemConsole:
lj->args.append("-SUBSYSTEM:console");
- add_win_link_args(lj, is_library);
+ add_win_link_args(lj, is_library, &have_windows_dll_import_libs);
break;
case TargetSubsystemEfiApplication:
lj->args.append("-SUBSYSTEM:efi_application");
@@ -1324,15 +2234,15 @@ static void construct_linker_job_coff(LinkJob *lj) {
break;
case TargetSubsystemNative:
lj->args.append("-SUBSYSTEM:native");
- add_win_link_args(lj, is_library);
+ add_win_link_args(lj, is_library, &have_windows_dll_import_libs);
break;
case TargetSubsystemPosix:
lj->args.append("-SUBSYSTEM:posix");
- add_win_link_args(lj, is_library);
+ add_win_link_args(lj, is_library, &have_windows_dll_import_libs);
break;
case TargetSubsystemWindows:
lj->args.append("-SUBSYSTEM:windows");
- add_win_link_args(lj, is_library);
+ add_win_link_args(lj, is_library, &have_windows_dll_import_libs);
break;
}
@@ -1354,9 +2264,12 @@ static void construct_linker_job_coff(LinkJob *lj) {
if (buf_eql_str(link_lib->name, "c")) {
continue;
}
-
- //note(dimenus): If we're linking in the CRT or the libs are provided explictly we don't want to generate def/libs
- if (lj->link_in_crt || link_lib->provided_explicitly) {
+ bool is_sys_lib = is_mingw_link_lib(link_lib->name);
+ if (have_windows_dll_import_libs && is_sys_lib) {
+ continue;
+ }
+ // If we're linking in the CRT or the libs are provided explictly we don't want to generate def/libs
+ if ((lj->link_in_crt && is_sys_lib) || link_lib->provided_explicitly) {
if (target_abi_is_gnu(lj->codegen->zig_target->abi)) {
Buf* lib_name = buf_sprintf("lib%s.a", buf_ptr(link_lib->name));
lj->args.append(buf_ptr(lib_name));
@@ -1722,3 +2635,4 @@ void codegen_link(CodeGen *g) {
exit(1);
}
}
+
diff --git a/src/main.cpp b/src/main.cpp
index 9329229a7b..ce68e53d85 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -91,7 +91,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
" -ffunction-sections places each function in a seperate section\n"
"\n"
"Link Options:\n"
- " --bundle-compiler-rt [path] for static libraries, include compiler-rt symbols\n"
+ " --bundle-compiler-rt for static libraries, include compiler-rt symbols\n"
" --dynamic-linker [path] set the path to ld.so\n"
" --each-lib-rpath add rpath for each used dynamic library\n"
" --library [lib] link against lib\n"
@@ -305,14 +305,12 @@ int main(int argc, char **argv) {
Error err;
if (argc == 2 && strcmp(argv[1], "BUILD_INFO") == 0) {
- printf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
+ printf("%s\n%s\n%s\n%s\n%s\n%s\n",
ZIG_CMAKE_BINARY_DIR,
ZIG_CXX_COMPILER,
ZIG_LLVM_CONFIG_EXE,
ZIG_LLD_INCLUDE_PATH,
ZIG_LLD_LIBRARIES,
- ZIG_STD_FILES,
- ZIG_C_HEADER_FILES,
ZIG_DIA_GUIDS_LIB);
return 0;
}
@@ -982,7 +980,7 @@ int main(int argc, char **argv) {
if (target_requires_pic(&target, have_libc) && want_pic == WantPICDisabled) {
Buf triple_buf = BUF_INIT;
- get_target_triple(&triple_buf, &target);
+ target_triple_zig(&triple_buf, &target);
fprintf(stderr, "`--disable-pic` is incompatible with target '%s'\n", buf_ptr(&triple_buf));
return print_error_usage(arg0);
}
@@ -1231,6 +1229,9 @@ int main(int argc, char **argv) {
return term.code;
} else if (cmd == CmdBuild) {
if (g->enable_cache) {
+#if defined(ZIG_OS_WINDOWS)
+ buf_replace(&g->output_file_path, '/', '\\');
+#endif
if (printf("%s\n", buf_ptr(&g->output_file_path)) < 0)
return EXIT_FAILURE;
}
diff --git a/src/target.cpp b/src/target.cpp
index 5cbf8c4de1..56c9a72c8f 100644
--- a/src/target.cpp
+++ b/src/target.cpp
@@ -753,7 +753,16 @@ void init_all_targets(void) {
LLVMInitializeAllAsmParsers();
}
-void get_target_triple(Buf *triple, const ZigTarget *target) {
+void target_triple_zig(Buf *triple, const ZigTarget *target) {
+ buf_resize(triple, 0);
+ buf_appendf(triple, "%s%s-%s-%s",
+ ZigLLVMGetArchTypeName(target->arch),
+ ZigLLVMGetSubArchTypeName(target->sub_arch),
+ ZigLLVMGetOSTypeName(get_llvm_os_type(target->os)),
+ ZigLLVMGetEnvironmentTypeName(target->abi));
+}
+
+void target_triple_llvm(Buf *triple, const ZigTarget *target) {
buf_resize(triple, 0);
buf_appendf(triple, "%s%s-%s-%s-%s",
ZigLLVMGetArchTypeName(target->arch),
@@ -984,7 +993,9 @@ bool target_allows_addr_zero(const ZigTarget *target) {
}
const char *target_o_file_ext(const ZigTarget *target) {
- if (target->abi == ZigLLVM_MSVC || target->os == OsWindows || target->os == OsUefi) {
+ if (target->abi == ZigLLVM_MSVC ||
+ (target->os == OsWindows && !target_abi_is_gnu(target->abi)) ||
+ target->os == OsUefi) {
return ".obj";
} else {
return ".o";
@@ -1012,7 +1023,10 @@ const char *target_exe_file_ext(const ZigTarget *target) {
}
const char *target_lib_file_prefix(const ZigTarget *target) {
- if (target->os == OsWindows || target->os == OsUefi || target_is_wasm(target)) {
+ if ((target->os == OsWindows && !target_abi_is_gnu(target->abi)) ||
+ target->os == OsUefi ||
+ target_is_wasm(target))
+ {
return "";
} else {
return "lib";
@@ -1027,7 +1041,11 @@ const char *target_lib_file_ext(const ZigTarget *target, bool is_static,
}
if (target->os == OsWindows || target->os == OsUefi) {
if (is_static) {
- return ".lib";
+ if (target->os == OsWindows && target_abi_is_gnu(target->abi)) {
+ return ".a";
+ } else {
+ return ".lib";
+ }
} else {
return ".dll";
}
@@ -1459,8 +1477,8 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) {
case OsKFreeBSD:
case OsNetBSD:
case OsHurd:
- return ZigLLVM_GNU;
case OsWindows:
+ return ZigLLVM_GNU;
case OsUefi:
return ZigLLVM_MSVC;
case OsLinux:
@@ -1504,18 +1522,23 @@ struct AvailableLibC {
static const AvailableLibC libcs_available[] = {
{ZigLLVM_aarch64_be, OsLinux, ZigLLVM_GNU},
{ZigLLVM_aarch64_be, OsLinux, ZigLLVM_Musl},
+ {ZigLLVM_aarch64_be, OsWindows, ZigLLVM_GNU},
{ZigLLVM_aarch64, OsLinux, ZigLLVM_GNU},
{ZigLLVM_aarch64, OsLinux, ZigLLVM_MuslEABI},
+ {ZigLLVM_aarch64, OsWindows, ZigLLVM_GNU},
{ZigLLVM_armeb, OsLinux, ZigLLVM_GNUEABI},
{ZigLLVM_armeb, OsLinux, ZigLLVM_GNUEABIHF},
{ZigLLVM_armeb, OsLinux, ZigLLVM_MuslEABI},
{ZigLLVM_armeb, OsLinux, ZigLLVM_MuslEABIHF},
+ {ZigLLVM_armeb, OsWindows, ZigLLVM_GNU},
{ZigLLVM_arm, OsLinux, ZigLLVM_GNUEABI},
{ZigLLVM_arm, OsLinux, ZigLLVM_GNUEABIHF},
{ZigLLVM_arm, OsLinux, ZigLLVM_MuslEABI},
{ZigLLVM_arm, OsLinux, ZigLLVM_MuslEABIHF},
+ {ZigLLVM_arm, OsWindows, ZigLLVM_GNU},
{ZigLLVM_x86, OsLinux, ZigLLVM_GNU},
{ZigLLVM_x86, OsLinux, ZigLLVM_Musl},
+ {ZigLLVM_x86, OsWindows, ZigLLVM_GNU},
{ZigLLVM_mips64el, OsLinux, ZigLLVM_GNUABI64},
{ZigLLVM_mips64el, OsLinux, ZigLLVM_GNUABIN32},
{ZigLLVM_mips64el, OsLinux, ZigLLVM_Musl},
@@ -1543,6 +1566,7 @@ static const AvailableLibC libcs_available[] = {
{ZigLLVM_x86_64, OsLinux, ZigLLVM_GNU},
{ZigLLVM_x86_64, OsLinux, ZigLLVM_GNUX32},
{ZigLLVM_x86_64, OsLinux, ZigLLVM_Musl},
+ {ZigLLVM_x86_64, OsWindows, ZigLLVM_GNU},
};
bool target_can_build_libc(const ZigTarget *target) {
@@ -1558,6 +1582,9 @@ bool target_can_build_libc(const ZigTarget *target) {
}
const char *target_libc_generic_name(const ZigTarget *target) {
+ if (target->os == OsWindows) {
+ return "mingw";
+ }
switch (target->abi) {
case ZigLLVM_GNU:
case ZigLLVM_GNUABIN32:
diff --git a/src/target.hpp b/src/target.hpp
index 99e38f1c62..e7e102a8ce 100644
--- a/src/target.hpp
+++ b/src/target.hpp
@@ -148,7 +148,8 @@ const char *target_oformat_name(ZigLLVM_ObjectFormatType oformat);
ZigLLVM_ObjectFormatType target_object_format(const ZigTarget *target);
void get_native_target(ZigTarget *target);
-void get_target_triple(Buf *triple, const ZigTarget *target);
+void target_triple_llvm(Buf *triple, const ZigTarget *target);
+void target_triple_zig(Buf *triple, const ZigTarget *target);
void init_all_targets(void);
diff --git a/src/translate_c.cpp b/src/translate_c.cpp
index 28e4a7daa4..69c70958e5 100644
--- a/src/translate_c.cpp
+++ b/src/translate_c.cpp
@@ -833,6 +833,27 @@ static bool qual_type_has_wrapping_overflow(Context *c, ZigClangQualType qt) {
}
}
+static bool type_is_function(Context *c, const ZigClangType *ty, ZigClangSourceLocation source_loc) {
+ switch (ZigClangType_getTypeClass(ty)) {
+ case ZigClangType_FunctionProto:
+ case ZigClangType_FunctionNoProto:
+ return true;
+ case ZigClangType_Elaborated: {
+ const clang::ElaboratedType *elaborated_ty = reinterpret_cast<const clang::ElaboratedType*>(ty);
+ ZigClangQualType qt = bitcast(elaborated_ty->getNamedType());
+ return type_is_function(c, ZigClangQualType_getTypePtr(qt), source_loc);
+ }
+ case ZigClangType_Typedef: {
+ const ZigClangTypedefType *typedef_ty = reinterpret_cast<const ZigClangTypedefType*>(ty);
+ const ZigClangTypedefNameDecl *typedef_decl = ZigClangTypedefType_getDecl(typedef_ty);
+ ZigClangQualType underlying_type = ZigClangTypedefNameDecl_getUnderlyingType(typedef_decl);
+ return type_is_function(c, ZigClangQualType_getTypePtr(underlying_type), source_loc);
+ }
+ default:
+ return false;
+ }
+}
+
static bool type_is_opaque(Context *c, const ZigClangType *ty, ZigClangSourceLocation source_loc) {
switch (ZigClangType_getTypeClass(ty)) {
case ZigClangType_Builtin: {
@@ -840,8 +861,23 @@ static bool type_is_opaque(Context *c, const ZigClangType *ty, ZigClangSourceLoc
return ZigClangBuiltinType_getKind(builtin_ty) == ZigClangBuiltinTypeVoid;
}
case ZigClangType_Record: {
- const clang::RecordType *record_ty = reinterpret_cast<const clang::RecordType*>(ty);
- return record_ty->getDecl()->getDefinition() == nullptr;
+ const ZigClangRecordType *record_ty = reinterpret_cast<const ZigClangRecordType*>(ty);
+ const ZigClangRecordDecl *record_decl = ZigClangRecordType_getDecl(record_ty);
+ const ZigClangRecordDecl *record_def = ZigClangRecordDecl_getDefinition(record_decl);
+ if (record_def == nullptr) {
+ return true;
+ }
+ for (auto it = reinterpret_cast<const clang::RecordDecl *>(record_def)->field_begin(),
+ it_end = reinterpret_cast<const clang::RecordDecl *>(record_def)->field_end();
+ it != it_end; ++it)
+ {
+ const clang::FieldDecl *field_decl = *it;
+
+ if (field_decl->isBitField()) {
+ return true;
+ }
+ }
+ return false;
}
case ZigClangType_Elaborated: {
const clang::ElaboratedType *elaborated_ty = reinterpret_cast<const clang::ElaboratedType*>(ty);
@@ -1019,7 +1055,9 @@ static AstNode *trans_type(Context *c, const ZigClangType *ty, ZigClangSourceLoc
return trans_create_node_prefix_op(c, PrefixOpOptional, child_node);
}
- if (type_is_opaque(c, ZigClangQualType_getTypePtr(child_qt), source_loc)) {
+ if (type_is_function(c, ZigClangQualType_getTypePtr(child_qt), source_loc)) {
+ return trans_create_node_prefix_op(c, PrefixOpOptional, child_node);
+ } else if (type_is_opaque(c, ZigClangQualType_getTypePtr(child_qt), source_loc)) {
AstNode *pointer_node = trans_create_node_ptr_type(c,
ZigClangQualType_isConstQualified(child_qt),
ZigClangQualType_isVolatileQualified(child_qt),
diff --git a/src/util.hpp b/src/util.hpp
index 6f26725135..1fa33b30f9 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <string.h>
#include <assert.h>
+#include <ctype.h>
#if defined(_MSC_VER)
@@ -161,6 +162,15 @@ static inline bool mem_eql_mem(const char *a_ptr, size_t a_len, const char *b_pt
return false;
return memcmp(a_ptr, b_ptr, a_len) == 0;
}
+static inline bool mem_eql_mem_ignore_case(const char *a_ptr, size_t a_len, const char *b_ptr, size_t b_len) {
+ if (a_len != b_len)
+ return false;
+ for (size_t i = 0; i < a_len; i += 1) {
+ if (tolower(a_ptr[i]) != tolower(b_ptr[i]))
+ return false;
+ }
+ return true;
+}
static inline bool mem_eql_str(const char *mem, size_t mem_len, const char *str) {
return mem_eql_mem(mem, mem_len, str, strlen(str));
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp
index 28062ea69f..7c87f31125 100644
--- a/src/zig_clang.cpp
+++ b/src/zig_clang.cpp
@@ -21,6 +21,7 @@
#include <clang/Frontend/ASTUnit.h>
#include <clang/Frontend/CompilerInstance.h>
+#include <clang/AST/APValue.h>
#include <clang/AST/Expr.h>
#if __GNUC__ >= 8
@@ -1287,6 +1288,20 @@ static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind
static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF16 == clang::StringLiteral::UTF16, "");
static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF32 == clang::StringLiteral::UTF32, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Uninitialized == clang::APValue::ValueKind::Uninitialized, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Int == clang::APValue::ValueKind::Int, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Float == clang::APValue::ValueKind::Float, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_ComplexInt == clang::APValue::ValueKind::ComplexInt, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_ComplexFloat == clang::APValue::ValueKind::ComplexFloat, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_LValue == clang::APValue::ValueKind::LValue, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Vector == clang::APValue::ValueKind::Vector, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Array == clang::APValue::ValueKind::Array, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Struct == clang::APValue::ValueKind::Struct, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_Union == clang::APValue::ValueKind::Union, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_MemberPointer == clang::APValue::ValueKind::MemberPointer, "");
+static_assert((clang::APValue::ValueKind)ZigClangAPValue_ValueKind_AddrLabelDiff == clang::APValue::ValueKind::AddrLabelDiff, "");
+
+static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "");
static_assert(sizeof(ZigClangSourceLocation) == sizeof(clang::SourceLocation), "");
static ZigClangSourceLocation bitcast(clang::SourceLocation src) {
@@ -1312,6 +1327,13 @@ static clang::QualType bitcast(ZigClangQualType src) {
return dest;
}
+static_assert(sizeof(ZigClangExprEvalResult) == sizeof(clang::Expr::EvalResult), "");
+static ZigClangExprEvalResult bitcast(clang::Expr::EvalResult src) {
+ ZigClangExprEvalResult dest;
+ memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangExprEvalResult));
+ return dest;
+}
+
static_assert(sizeof(ZigClangAPValueLValueBase) == sizeof(clang::APValue::LValueBase), "");
static ZigClangAPValueLValueBase bitcast(clang::APValue::LValueBase src) {
ZigClangAPValueLValueBase dest;
@@ -1331,6 +1353,12 @@ static ZigClangCompoundStmt_const_body_iterator bitcast(clang::CompoundStmt::con
return dest;
}
+static_assert(sizeof(ZigClangDeclStmt_const_decl_iterator) == sizeof(clang::DeclStmt::const_decl_iterator), "");
+static ZigClangDeclStmt_const_decl_iterator bitcast(clang::DeclStmt::const_decl_iterator src) {
+ ZigClangDeclStmt_const_decl_iterator dest;
+ memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangDeclStmt_const_decl_iterator));
+ return dest;
+}
ZigClangSourceLocation ZigClangSourceManager_getSpellingLoc(const ZigClangSourceManager *self,
ZigClangSourceLocation Loc)
@@ -1381,7 +1409,7 @@ ZigClangSourceManager *ZigClangASTUnit_getSourceManager(ZigClangASTUnit *self) {
return reinterpret_cast<ZigClangSourceManager *>(result);
}
-bool ZigClangASTUnit_visitLocalTopLevelDecls(ZigClangASTUnit *self, void *context,
+bool ZigClangASTUnit_visitLocalTopLevelDecls(ZigClangASTUnit *self, void *context,
bool (*Fn)(void *context, const ZigClangDecl *decl))
{
return reinterpret_cast<clang::ASTUnit *>(self)->visitLocalTopLevelDecls(context,
@@ -1540,6 +1568,11 @@ const ZigClangType *ZigClangQualType_getTypePtr(ZigClangQualType self) {
return reinterpret_cast<const ZigClangType *>(ty);
}
+ZigClangTypeClass ZigClangQualType_getTypeClass(ZigClangQualType self) {
+ clang::QualType ty = bitcast(self);
+ return (ZigClangTypeClass)(ty->getTypeClass());
+}
+
void ZigClangQualType_addConst(ZigClangQualType *self) {
reinterpret_cast<clang::QualType *>(self)->addConst();
}
@@ -1815,6 +1848,21 @@ void ZigClangASTUnit_delete(struct ZigClangASTUnit *self) {
delete reinterpret_cast<clang::ASTUnit *>(self);
}
+struct ZigClangQualType ZigClangVarDecl_getType(const struct ZigClangVarDecl *self) {
+ auto casted = reinterpret_cast<const clang::VarDecl *>(self);
+ return bitcast(casted->getType());
+}
+
+const struct ZigClangExpr *ZigClangVarDecl_getInit(const struct ZigClangVarDecl *self) {
+ auto casted = reinterpret_cast<const clang::VarDecl *>(self);
+ return reinterpret_cast<const ZigClangExpr *>(casted->getInit());
+}
+
+enum ZigClangVarDecl_TLSKind ZigClangVarDecl_getTLSKind(const ZigClangVarDecl *self) {
+ auto casted = reinterpret_cast<const clang::VarDecl *>(self);
+ return (ZigClangVarDecl_TLSKind)casted->getTLSKind();
+}
+
enum ZigClangBuiltinTypeKind ZigClangBuiltinType_getKind(const struct ZigClangBuiltinType *self) {
auto casted = reinterpret_cast<const clang::BuiltinType *>(self);
return (ZigClangBuiltinTypeKind)casted->getKind();
@@ -1862,6 +1910,16 @@ ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_end(const str
return bitcast(casted->body_end());
}
+ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_begin(const struct ZigClangDeclStmt *self) {
+ auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
+ return bitcast(casted->decl_begin());
+}
+
+ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigClangDeclStmt *self) {
+ auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
+ return bitcast(casted->decl_end());
+}
+
unsigned ZigClangAPFloat_convertToHexString(const ZigClangAPFloat *self, char *DST,
unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM)
{
@@ -1888,3 +1946,104 @@ const struct ZigClangStringLiteral *ZigClangPredefinedExpr_getFunctionName(
const clang::StringLiteral *result = casted->getFunctionName();
return reinterpret_cast<const struct ZigClangStringLiteral *>(result);
}
+
+ZigClangSourceLocation ZigClangImplicitCastExpr_getBeginLoc(const struct ZigClangImplicitCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
+ return bitcast(casted->getBeginLoc());
+}
+
+enum ZigClangCK ZigClangImplicitCastExpr_getCastKind(const struct ZigClangImplicitCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
+ return (ZigClangCK)casted->getCastKind();
+}
+
+const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(const struct ZigClangImplicitCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
+}
+
+struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *self) {
+ auto casted = reinterpret_cast<const clang::ArrayType *>(self);
+ return bitcast(casted->getElementType());
+}
+
+const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *self) {
+ auto casted = reinterpret_cast<const clang::DeclRefExpr *>(self);
+ return reinterpret_cast<const struct ZigClangValueDecl *>(casted->getDecl());
+}
+
+struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *self) {
+ auto casted = reinterpret_cast<const clang::ParenType *>(self);
+ return bitcast(casted->getInnerType());
+}
+
+struct ZigClangQualType ZigClangAttributedType_getEquivalentType(const struct ZigClangAttributedType *self) {
+ auto casted = reinterpret_cast<const clang::AttributedType *>(self);
+ return bitcast(casted->getEquivalentType());
+}
+
+struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClangElaboratedType *self) {
+ auto casted = reinterpret_cast<const clang::ElaboratedType *>(self);
+ return bitcast(casted->getNamedType());
+}
+
+struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
+ return bitcast(casted->getBeginLoc());
+}
+
+const struct ZigClangExpr *ZigClangCStyleCastExpr_getSubExpr(const struct ZigClangCStyleCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
+}
+
+struct ZigClangQualType ZigClangCStyleCastExpr_getType(const struct ZigClangCStyleCastExpr *self) {
+ auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
+ return bitcast(casted->getType());
+}
+
+bool ZigClangIntegerLiteral_EvaluateAsInt(const struct ZigClangIntegerLiteral *self, struct ZigClangExprEvalResult *result, const struct ZigClangASTContext *ctx) {
+ auto casted_self = reinterpret_cast<const clang::IntegerLiteral *>(self);
+ auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
+ clang::Expr::EvalResult eval_result;
+ if (!casted_self->EvaluateAsInt(eval_result, *casted_ctx)) {
+ return false;
+ }
+ *result = bitcast(eval_result);
+ return true;
+}
+
+struct ZigClangSourceLocation ZigClangIntegerLiteral_getBeginLoc(const struct ZigClangIntegerLiteral *self) {
+ auto casted = reinterpret_cast<const clang::IntegerLiteral *>(self);
+ return bitcast(casted->getBeginLoc());
+}
+
+const struct ZigClangExpr *ZigClangReturnStmt_getRetValue(const struct ZigClangReturnStmt *self) {
+ auto casted = reinterpret_cast<const clang::ReturnStmt *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getRetValue());
+}
+
+enum ZigClangBO ZigClangBinaryOperator_getOpcode(const struct ZigClangBinaryOperator *self) {
+ auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
+ return (ZigClangBO)casted->getOpcode();
+}
+
+struct ZigClangSourceLocation ZigClangBinaryOperator_getBeginLoc(const struct ZigClangBinaryOperator *self) {
+ auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
+ return bitcast(casted->getBeginLoc());
+}
+
+const struct ZigClangExpr *ZigClangBinaryOperator_getLHS(const struct ZigClangBinaryOperator *self) {
+ auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
+}
+
+const struct ZigClangExpr *ZigClangBinaryOperator_getRHS(const struct ZigClangBinaryOperator *self) {
+ auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
+}
+
+struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBinaryOperator *self) {
+ auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
+ return bitcast(casted->getType());
+}
diff --git a/src/zig_clang.h b/src/zig_clang.h
index 1bdf34fc2f..9d03b592fd 100644
--- a/src/zig_clang.h
+++ b/src/zig_clang.h
@@ -30,6 +30,38 @@ struct ZigClangAPValueLValueBase {
unsigned Version;
};
+enum ZigClangAPValue_ValueKind {
+ ZigClangAPValue_ValueKind_Uninitialized,
+ ZigClangAPValue_ValueKind_Int,
+ ZigClangAPValue_ValueKind_Float,
+ ZigClangAPValue_ValueKind_ComplexInt,
+ ZigClangAPValue_ValueKind_ComplexFloat,
+ ZigClangAPValue_ValueKind_LValue,
+ ZigClangAPValue_ValueKind_Vector,
+ ZigClangAPValue_ValueKind_Array,
+ ZigClangAPValue_ValueKind_Struct,
+ ZigClangAPValue_ValueKind_Union,
+ ZigClangAPValue_ValueKind_MemberPointer,
+ ZigClangAPValue_ValueKind_AddrLabelDiff
+};
+
+struct ZigClangAPValue {
+ enum ZigClangAPValue_ValueKind Kind;
+ // experimentally-derived size of clang::APValue::DataType
+#if defined(WIN32) && defined(_MSC_VER)
+ char Data[52];
+#else
+ char Data[68];
+#endif
+};
+
+struct ZigClangExprEvalResult {
+ bool HasSideEffects;
+ bool HasUndefinedBehavior;
+ void *SmallVectorImpl;
+ ZigClangAPValue Val;
+};
+
struct ZigClangAPValue;
struct ZigClangAPSInt;
struct ZigClangAPFloat;
@@ -105,6 +137,7 @@ struct ZigClangFunctionType;
struct ZigClangPredefinedExpr;
typedef struct ZigClangStmt *const * ZigClangCompoundStmt_const_body_iterator;
+typedef struct ZigClangDecl *const * ZigClangDeclStmt_const_decl_iterator;
enum ZigClangBO {
ZigClangBO_PtrMemD,
@@ -732,6 +765,12 @@ enum ZigClangStringLiteral_StringKind {
ZigClangStringLiteral_StringKind_UTF32,
};
+enum ZigClangVarDecl_TLSKind {
+ ZigClangVarDecl_TLSKind_None,
+ ZigClangVarDecl_TLSKind_Static,
+ ZigClangVarDecl_TLSKind_Dynamic,
+};
+
ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangSourceManager_getSpellingLoc(const struct ZigClangSourceManager *,
struct ZigClangSourceLocation Loc);
ZIG_EXTERN_C const char *ZigClangSourceManager_getFilename(const struct ZigClangSourceManager *,
@@ -754,7 +793,7 @@ ZIG_EXTERN_C void ZigClangErrorMsg_delete(struct Stage2ErrorMsg *ptr, size_t len
ZIG_EXTERN_C struct ZigClangASTContext *ZigClangASTUnit_getASTContext(struct ZigClangASTUnit *);
ZIG_EXTERN_C struct ZigClangSourceManager *ZigClangASTUnit_getSourceManager(struct ZigClangASTUnit *);
-ZIG_EXTERN_C bool ZigClangASTUnit_visitLocalTopLevelDecls(struct ZigClangASTUnit *, void *context,
+ZIG_EXTERN_C bool ZigClangASTUnit_visitLocalTopLevelDecls(struct ZigClangASTUnit *, void *context,
bool (*Fn)(void *context, const struct ZigClangDecl *decl));
ZIG_EXTERN_C const struct ZigClangRecordDecl *ZigClangRecordType_getDecl(const struct ZigClangRecordType *record_ty);
@@ -789,6 +828,10 @@ ZIG_EXTERN_C const char *ZigClangDecl_getName_bytes_begin(const struct ZigClangD
ZIG_EXTERN_C enum ZigClangDeclKind ZigClangDecl_getKind(const struct ZigClangDecl *decl);
ZIG_EXTERN_C const char *ZigClangDecl_getDeclKindName(const struct ZigClangDecl *decl);
+ZIG_EXTERN_C struct ZigClangQualType ZigClangVarDecl_getType(const struct ZigClangVarDecl *);
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangVarDecl_getInit(const struct ZigClangVarDecl *var_decl);
+ZIG_EXTERN_C enum ZigClangVarDecl_TLSKind ZigClangVarDecl_getTLSKind(const struct ZigClangVarDecl *var_decl);
+
ZIG_EXTERN_C bool ZigClangSourceLocation_eq(struct ZigClangSourceLocation a, struct ZigClangSourceLocation b);
ZIG_EXTERN_C const struct ZigClangTypedefNameDecl *ZigClangTypedefType_getDecl(const struct ZigClangTypedefType *);
@@ -796,6 +839,7 @@ ZIG_EXTERN_C struct ZigClangQualType ZigClangTypedefNameDecl_getUnderlyingType(c
ZIG_EXTERN_C struct ZigClangQualType ZigClangQualType_getCanonicalType(struct ZigClangQualType);
ZIG_EXTERN_C const struct ZigClangType *ZigClangQualType_getTypePtr(struct ZigClangQualType);
+ZIG_EXTERN_C enum ZigClangTypeClass ZigClangQualType_getTypeClass(struct ZigClangQualType);
ZIG_EXTERN_C void ZigClangQualType_addConst(struct ZigClangQualType *);
ZIG_EXTERN_C bool ZigClangQualType_eq(struct ZigClangQualType, struct ZigClangQualType);
ZIG_EXTERN_C bool ZigClangQualType_isConstQualified(struct ZigClangQualType);
@@ -846,6 +890,9 @@ ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionProtoType_getParamType(cons
ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_begin(const struct ZigClangCompoundStmt *self);
ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_end(const struct ZigClangCompoundStmt *self);
+ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_begin(const struct ZigClangDeclStmt *self);
+ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigClangDeclStmt *self);
+
ZIG_EXTERN_C unsigned ZigClangAPFloat_convertToHexString(const struct ZigClangAPFloat *self, char *DST,
unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM);
@@ -855,4 +902,34 @@ ZIG_EXTERN_C const char *ZigClangStringLiteral_getString_bytes_begin_size(const
ZIG_EXTERN_C const struct ZigClangStringLiteral *ZigClangPredefinedExpr_getFunctionName(
const struct ZigClangPredefinedExpr *self);
+
+ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangImplicitCastExpr_getBeginLoc(const struct ZigClangImplicitCastExpr *);
+ZIG_EXTERN_C enum ZigClangCK ZigClangImplicitCastExpr_getCastKind(const struct ZigClangImplicitCastExpr *);
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(const struct ZigClangImplicitCastExpr *);
+
+ZIG_EXTERN_C struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *);
+
+ZIG_EXTERN_C const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *);
+
+ZIG_EXTERN_C struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *);
+
+ZIG_EXTERN_C struct ZigClangQualType ZigClangAttributedType_getEquivalentType(const struct ZigClangAttributedType *);
+
+ZIG_EXTERN_C struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClangElaboratedType *);
+
+ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *);
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCStyleCastExpr_getSubExpr(const struct ZigClangCStyleCastExpr *);
+ZIG_EXTERN_C struct ZigClangQualType ZigClangCStyleCastExpr_getType(const struct ZigClangCStyleCastExpr *);
+
+ZIG_EXTERN_C bool ZigClangIntegerLiteral_EvaluateAsInt(const struct ZigClangIntegerLiteral *, struct ZigClangExprEvalResult *, const struct ZigClangASTContext *);
+ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangIntegerLiteral_getBeginLoc(const struct ZigClangIntegerLiteral *);
+
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangReturnStmt_getRetValue(const struct ZigClangReturnStmt *);
+
+ZIG_EXTERN_C enum ZigClangBO ZigClangBinaryOperator_getOpcode(const struct ZigClangBinaryOperator *);
+ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangBinaryOperator_getBeginLoc(const struct ZigClangBinaryOperator *);
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getLHS(const struct ZigClangBinaryOperator *);
+ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getRHS(const struct ZigClangBinaryOperator *);
+ZIG_EXTERN_C struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBinaryOperator *);
+
#endif