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
d580b3f9a6
commit
86c4e3c8da
2 changed files with 2 additions and 2 deletions
|
@ -351,7 +351,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")
|
||||
|
||||
|
|
|
@ -559,7 +559,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…
Add table
Reference in a new issue