mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-15 21:49:20 +00:00
Hide warnings from GCC if compiling with LTO
This adds the change fromd643edc
(in scons) and941433e
(in cmake) to the linking step as well, but only when using LTO closes #5350
This commit is contained in:
parent
24d3872b3d
commit
37dfcad927
|
@ -382,7 +382,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto=${LTO_JOBS}" CACHE STRING "Release build flags with LTO" FORCE)
|
||||
|
||||
MESSAGE("Using GCC gold linker")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -fuse-ld=gold" CACHE STRING "" FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -fuse-ld=gold -Wno-stringop-overflow" CACHE STRING "" FORCE)
|
||||
endif(ENABLE_LTO)
|
||||
endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
|
||||
|
|
|
@ -591,7 +591,7 @@ for env in [test_env, client_env, env]:
|
|||
|
||||
if env["enable_lto"] == True:
|
||||
rel_comp_flags = rel_comp_flags + " -flto=" + str(env["jobs"])
|
||||
rel_link_flags = rel_comp_flags + " -fuse-ld=gold"
|
||||
rel_link_flags = rel_comp_flags + " -fuse-ld=gold -Wno-stringop-overflow"
|
||||
elif "clang" in env["CXX"]:
|
||||
if env["pgo_data"] == "generate":
|
||||
rel_comp_flags = rel_comp_flags + " -fprofile-instr-generate=pgo_data/wesnoth-%p.profraw"
|
||||
|
|
Loading…
Reference in New Issue
Block a user