| ... | @@ -35,6 +35,7 @@ set(ZIG_LIBC_STATIC_LIB_DIR "" CACHE STRING "Default native target libc director | ... | @@ -35,6 +35,7 @@ set(ZIG_LIBC_STATIC_LIB_DIR "" CACHE STRING "Default native target libc director |
| 35 | set(ZIG_LIBC_INCLUDE_DIR "/usr/include" CACHE STRING "Default native target libc include directory") | 35 | set(ZIG_LIBC_INCLUDE_DIR "/usr/include" CACHE STRING "Default native target libc include directory") |
| 36 | set(ZIG_DYNAMIC_LINKER "" CACHE STRING "Override dynamic linker for native target") | 36 | set(ZIG_DYNAMIC_LINKER "" CACHE STRING "Override dynamic linker for native target") |
| 37 | set(ZIG_EACH_LIB_RPATH off CACHE BOOL "Add each dynamic library to rpath for native target") | 37 | set(ZIG_EACH_LIB_RPATH off CACHE BOOL "Add each dynamic library to rpath for native target") |
| | 38 | set(ZIG_STATIC off CACHE BOOL "Attempt to build a static zig executable (not compatible with glibc)") |
| 38 | | 39 | |
| 39 | string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_LIB_DIR_ESCAPED "${ZIG_LIBC_LIB_DIR}") | 40 | string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_LIB_DIR_ESCAPED "${ZIG_LIBC_LIB_DIR}") |
| 40 | string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_STATIC_LIB_DIR_ESCAPED "${ZIG_LIBC_STATIC_LIB_DIR}") | 41 | string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_STATIC_LIB_DIR_ESCAPED "${ZIG_LIBC_STATIC_LIB_DIR}") |
| ... | @@ -698,6 +699,8 @@ if(MINGW) | ... | @@ -698,6 +699,8 @@ if(MINGW) |
| 698 | set(EXE_LDFLAGS "-static -static-libgcc -static-libstdc++") | 699 | set(EXE_LDFLAGS "-static -static-libgcc -static-libstdc++") |
| 699 | elseif(MSVC) | 700 | elseif(MSVC) |
| 700 | set(EXE_LDFLAGS "/STACK:16777216") | 701 | set(EXE_LDFLAGS "/STACK:16777216") |
| | 702 | elseif(ZIG_STATIC) |
| | 703 | set(EXE_LDFLAGS "-static") |
| 701 | else() | 704 | else() |
| 702 | set(EXE_LDFLAGS " ") | 705 | set(EXE_LDFLAGS " ") |
| 703 | endif() | 706 | endif() |