build: rename zig1 to zig0 to avoid confusion with stage1

master
Andrew Kelley 2019-04-17 14:09:18 -04:00
parent bc2d60c11f
commit 4ad7d09ba5
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 5 additions and 5 deletions

View File

@ -411,7 +411,7 @@ find_package(Threads)
set(ZIG_MAIN_SRC "${CMAKE_SOURCE_DIR}/src/main.cpp") set(ZIG_MAIN_SRC "${CMAKE_SOURCE_DIR}/src/main.cpp")
# This is our shim which will be replaced by libuserland written in Zig. # This is our shim which will be replaced by libuserland written in Zig.
set(ZIG1_SHIM_SRC "${CMAKE_SOURCE_DIR}/src/userland.cpp") set(ZIG0_SHIM_SRC "${CMAKE_SOURCE_DIR}/src/userland.cpp")
set(ZIG_SOURCES set(ZIG_SOURCES
"${CMAKE_SOURCE_DIR}/src/analyze.cpp" "${CMAKE_SOURCE_DIR}/src/analyze.cpp"
@ -6677,12 +6677,12 @@ if(MSVC OR MINGW)
target_link_libraries(compiler LINK_PUBLIC version) target_link_libraries(compiler LINK_PUBLIC version)
endif() endif()
add_executable(zig1 "${ZIG_MAIN_SRC}" "${ZIG1_SHIM_SRC}") add_executable(zig0 "${ZIG_MAIN_SRC}" "${ZIG0_SHIM_SRC}")
set_target_properties(zig1 PROPERTIES set_target_properties(zig0 PROPERTIES
COMPILE_FLAGS ${EXE_CFLAGS} COMPILE_FLAGS ${EXE_CFLAGS}
LINK_FLAGS ${EXE_LDFLAGS} LINK_FLAGS ${EXE_LDFLAGS}
) )
target_link_libraries(zig1 compiler) target_link_libraries(zig0 compiler)
if(WIN32) if(WIN32)
set(LIBUSERLAND "${CMAKE_BINARY_DIR}/userland.lib") set(LIBUSERLAND "${CMAKE_BINARY_DIR}/userland.lib")
@ -6693,7 +6693,7 @@ else()
endif() endif()
add_custom_command( add_custom_command(
OUTPUT "${LIBUSERLAND}" OUTPUT "${LIBUSERLAND}"
COMMAND zig1 ARGS build COMMAND zig0 ARGS build
--override-std-dir std --override-std-dir std
--override-lib-dir "${CMAKE_SOURCE_DIR}" --override-lib-dir "${CMAKE_SOURCE_DIR}"
libuserland libuserland