Skip to content

Commit

Permalink
fixed compilation on mingw-w64
Browse files Browse the repository at this point in the history
  • Loading branch information
emekoi authored and andrewrk committed Jul 12, 2019
1 parent 107e574 commit bdfb314
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8840,7 +8840,7 @@ set_target_properties(zig0 PROPERTIES
)
target_link_libraries(zig0 compiler)

if(WIN32)
if(MSVC)
set(LIBUSERLAND "${CMAKE_BINARY_DIR}/userland.lib")
else()
set(LIBUSERLAND "${CMAKE_BINARY_DIR}/libuserland.a")
Expand All @@ -8865,9 +8865,7 @@ add_custom_command(
)
add_custom_target(userland_target DEPENDS "${LIBUSERLAND}")
add_executable(zig "${ZIG_MAIN_SRC}")
if(MINGW)
set(EXE_LDFLAGS "${EXE_LDFLAGS} -fstack-protector")
endif()

set_target_properties(zig PROPERTIES
COMPILE_FLAGS ${EXE_CFLAGS}
LINK_FLAGS ${EXE_LDFLAGS}
Expand Down

0 comments on commit bdfb314

Please sign in to comment.