mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 17:14:18 +00:00
Merge #2783
2783: Don't insert timestamps into PEs with MinGW r=def- a=heinrich5991 Should make the build reproducible. Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
commit
21a51ff64b
|
@ -172,11 +172,15 @@ if(NOT MSVC)
|
|||
# Inaccurate floating point numbers cause problems on mingw-w64-gcc when
|
||||
# compiling for x86, might cause problems elsewhere. So don't store floats
|
||||
# in registers but keep them at higher accuracy.
|
||||
|
||||
if(TARGET_ARCH STREQUAL "x86")
|
||||
add_c_compiler_flag_if_supported(OUR_FLAGS -ffloat-store)
|
||||
endif()
|
||||
|
||||
# Don't insert timestamps into PEs to keep the build reproducible.
|
||||
if(TARGET_OS STREQUAL "windows")
|
||||
add_c_compiler_flag_if_supported(OUR_FLAGS_LINK -Wl,--no-insert-timestamp)
|
||||
endif()
|
||||
|
||||
if(TARGET_OS STREQUAL "mac")
|
||||
add_c_compiler_flag_if_supported(OUR_FLAGS -stdlib=libc++)
|
||||
endif()
|
||||
|
@ -2516,6 +2520,9 @@ foreach(target ${TARGETS})
|
|||
target_compile_options(${target} PRIVATE /GS) # Protect the stack pointer.
|
||||
target_compile_options(${target} PRIVATE /wd4996) # Use of non-_s functions.
|
||||
endif()
|
||||
if(OUR_FLAGS_LINK)
|
||||
target_link_libraries(${target} ${OUR_FLAGS_LINK})
|
||||
endif()
|
||||
if(OUR_FLAGS)
|
||||
target_compile_options(${target} PRIVATE ${OUR_FLAGS})
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue