From 2de53592a1d84a1476f662e20d7339d25d4716fe Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 3 Oct 2020 23:15:45 -0700 Subject: stage1: better value for builtin.link_mode Now it is Dynamic unless -DZIG_STATIC=on is passed to cmake. This partially addresses #6469. --- src/stage1/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stage1/codegen.cpp') diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 2fc85b42fe..194e5e38fb 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -8815,7 +8815,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { buf_append_str(contents, "/// Deprecated: use `std.Target.current.cpu.arch.endian()`\n"); buf_append_str(contents, "pub const endian = Target.current.cpu.arch.endian();\n"); buf_appendf(contents, "pub const output_mode = OutputMode.Obj;\n"); - buf_appendf(contents, "pub const link_mode = LinkMode.Static;\n"); + buf_appendf(contents, "pub const link_mode = LinkMode.%s;\n", ZIG_LINK_MODE); buf_appendf(contents, "pub const is_test = false;\n"); buf_appendf(contents, "pub const single_threaded = %s;\n", bool_to_str(g->is_single_threaded)); buf_appendf(contents, "pub const abi = Abi.%s;\n", cur_abi); -- cgit v1.2.3