stage1: build blake code with -std=c99

master
Andrew Kelley 2018-09-11 17:29:18 -04:00
parent 9227315bf2
commit a1132ffe0f
2 changed files with 7 additions and 6 deletions

View File

@ -426,8 +426,8 @@ set(ZIG_SOURCES
"${CMAKE_SOURCE_DIR}/src/util.cpp"
"${CMAKE_SOURCE_DIR}/src/translate_c.cpp"
)
set(ZIG_SOURCES_O3
"${CMAKE_SOURCE_DIR}/src/blake2b.cpp"
set(BLAKE_SOURCES
"${CMAKE_SOURCE_DIR}/src/blake2b.c"
)
set(ZIG_CPP_SOURCES
"${CMAKE_SOURCE_DIR}/src/zig_llvm.cpp"
@ -795,6 +795,7 @@ else()
set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -Werror=strict-prototypes -Werror=old-style-definition -Werror=type-limits -Wno-missing-braces")
endif()
set(BLAKE_CFLAGS "-std=c99")
set(EXE_LDFLAGS " ")
if(MINGW)
@ -816,9 +817,9 @@ set_target_properties(zig_cpp PROPERTIES
COMPILE_FLAGS ${EXE_CFLAGS}
)
add_library(zig_O3 STATIC ${ZIG_SOURCES_O3})
set_target_properties(zig_O3 PROPERTIES
COMPILE_FLAGS "${EXE_CFLAGS} -O3"
add_library(embedded_blake STATIC ${BLAKE_SOURCES})
set_target_properties(embedded_blake PROPERTIES
COMPILE_FLAGS "${BLAKE_CFLAGS} -O3"
)
add_executable(zig ${ZIG_SOURCES})
@ -829,7 +830,7 @@ set_target_properties(zig PROPERTIES
target_link_libraries(zig LINK_PUBLIC
zig_cpp
zig_O3
embedded_blake
${SOFTFLOAT_LIBRARIES}
${CLANG_LIBRARIES}
${LLD_LIBRARIES}