Merge remote-tracking branch 'origin/master' into llvm8
This commit is contained in:
@@ -178,7 +178,8 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out
|
||||
|
||||
// On Darwin/MacOS/iOS, we always link libSystem which contains libc.
|
||||
if (g->zig_target.os == OsMacOSX ||
|
||||
g->zig_target.os == OsIOS)
|
||||
g->zig_target.os == OsIOS ||
|
||||
g->zig_target.os == OsFreeBSD)
|
||||
{
|
||||
g->libc_link_lib = create_link_lib(buf_create_from_str("c"));
|
||||
g->link_libs_list.append(g->libc_link_lib);
|
||||
@@ -291,11 +292,6 @@ void codegen_add_framework(CodeGen *g, const char *framework) {
|
||||
g->darwin_frameworks.append(buf_create_from_str(framework));
|
||||
}
|
||||
|
||||
void codegen_set_windows_subsystem(CodeGen *g, bool mwindows, bool mconsole) {
|
||||
g->windows_subsystem_windows = mwindows;
|
||||
g->windows_subsystem_console = mconsole;
|
||||
}
|
||||
|
||||
void codegen_set_mmacosx_version_min(CodeGen *g, Buf *mmacosx_version_min) {
|
||||
g->mmacosx_version_min = mmacosx_version_min;
|
||||
}
|
||||
@@ -7236,8 +7232,7 @@ static void init(CodeGen *g) {
|
||||
}
|
||||
|
||||
if (g->is_test_build) {
|
||||
g->windows_subsystem_windows = false;
|
||||
g->windows_subsystem_console = true;
|
||||
g->subsystem = TargetSubsystemConsole;
|
||||
}
|
||||
|
||||
assert(g->root_out_name);
|
||||
@@ -7273,7 +7268,7 @@ static void init(CodeGen *g) {
|
||||
// LLVM creates invalid binaries on Windows sometimes.
|
||||
// See https://github.com/ziglang/zig/issues/508
|
||||
// As a workaround we do not use target native features on Windows.
|
||||
if (g->zig_target.os == OsWindows) {
|
||||
if (g->zig_target.os == OsWindows || g->zig_target.os == OsUefi) {
|
||||
target_specific_cpu_args = "";
|
||||
target_specific_features = "";
|
||||
} else {
|
||||
@@ -7519,6 +7514,7 @@ static void gen_root_source(CodeGen *g) {
|
||||
report_errors_and_maybe_exit(g);
|
||||
|
||||
if (!g->is_test_build && g->zig_target.os != OsFreestanding &&
|
||||
g->zig_target.os != OsUefi &&
|
||||
!g->have_c_main && !g->have_winmain && !g->have_winmain_crt_startup &&
|
||||
((g->have_pub_main && g->out_type == OutTypeObj) || g->out_type == OutTypeExe))
|
||||
{
|
||||
@@ -8075,12 +8071,11 @@ static Error check_cache(CodeGen *g, Buf *manifest_dir, Buf *digest) {
|
||||
cache_int(ch, g->zig_target.os);
|
||||
cache_int(ch, g->zig_target.env_type);
|
||||
cache_int(ch, g->zig_target.oformat);
|
||||
cache_int(ch, g->subsystem);
|
||||
cache_bool(ch, g->is_static);
|
||||
cache_bool(ch, g->strip_debug_symbols);
|
||||
cache_bool(ch, g->is_test_build);
|
||||
cache_bool(ch, g->is_native_target);
|
||||
cache_bool(ch, g->windows_subsystem_windows);
|
||||
cache_bool(ch, g->windows_subsystem_console);
|
||||
cache_bool(ch, g->linker_rdynamic);
|
||||
cache_bool(ch, g->no_rosegment_workaround);
|
||||
cache_bool(ch, g->each_lib_rpath);
|
||||
|
||||
Reference in New Issue
Block a user