| author | |
| committer | |
| log | 2de53592a1d84a1476f662e20d7339d25d4716fe |
| tree | f62adaee50354c29477dc80c58ee4c3d2a7ce7c2 |
| parent | ab7ea5354101ffaf5c9708ca6398ff7b765b781f |
Now it is Dynamic unless -DZIG_STATIC=on is passed to cmake.
This partially addresses #6469.3 files changed, 5 insertions(+), 1 deletions(-)
CMakeLists.txt+3| ... | ... | @@ -63,6 +63,9 @@ endif() |
| 63 | 63 | |
| 64 | 64 | if(ZIG_STATIC) |
| 65 | 65 | set(ZIG_STATIC_LLVM "on") |
| 66 | set(ZIG_LINK_MODE "Static") | |
| 67 | else() | |
| 68 | set(ZIG_LINK_MODE "Dynamic") | |
| 66 | 69 | endif() |
| 67 | 70 | |
| 68 | 71 | string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_LIB_DIR_ESCAPED "${ZIG_LIBC_LIB_DIR}") |
src/stage1/codegen.cpp+1-1| ... | ... | @@ -8815,7 +8815,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { |
| 8815 | 8815 | buf_append_str(contents, "/// Deprecated: use `std.Target.current.cpu.arch.endian()`\n"); |
| 8816 | 8816 | buf_append_str(contents, "pub const endian = Target.current.cpu.arch.endian();\n"); |
| 8817 | 8817 | buf_appendf(contents, "pub const output_mode = OutputMode.Obj;\n"); |
| 8818 | buf_appendf(contents, "pub const link_mode = LinkMode.Static;\n"); | |
| 8818 | buf_appendf(contents, "pub const link_mode = LinkMode.%s;\n", ZIG_LINK_MODE); | |
| 8819 | 8819 | buf_appendf(contents, "pub const is_test = false;\n"); |
| 8820 | 8820 | buf_appendf(contents, "pub const single_threaded = %s;\n", bool_to_str(g->is_single_threaded)); |
| 8821 | 8821 | buf_appendf(contents, "pub const abi = Abi.%s;\n", cur_abi); |
src/stage1/config.h.in+1| ... | ... | @@ -21,5 +21,6 @@ |
| 21 | 21 | #define ZIG_CLANG_LIBRARIES "@CLANG_LIBRARIES@" |
| 22 | 22 | #define ZIG_LLVM_CONFIG_EXE "@LLVM_CONFIG_EXE@" |
| 23 | 23 | #define ZIG_DIA_GUIDS_LIB "@ZIG_DIA_GUIDS_LIB_ESCAPED@" |
| 24 | #define ZIG_LINK_MODE "@ZIG_LINK_MODE@" | |
| 24 | 25 | |
| 25 | 26 | #endif |