5248: Add back compiler warnings on macOS (oops) r=heinrich5991 a=def-

Judged the scope wrong.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2022-06-01 08:45:27 +00:00 committed by GitHub
commit 45fbc627fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,34 +255,36 @@ if(CMAKE_GENERATOR STREQUAL "Ninja")
add_cxx_compiler_flag_if_supported(OUR_FLAGS -fcolor-diagnostics)
endif()
if(NOT MSVC AND NOT HAIKU AND NOT TARGET_OS STREQUAL "mac")
if(NOT FUSE_LD STREQUAL OFF)
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=${FUSE_LD})
if(FLAG_SUPPORTED_fuse_ld_${FUSE_LD})
message(STATUS "Using ${FUSE_LD} linker")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT ENABLE_IPO)
# GCC+LTO: pthread_create has failed: Resource temporarily unavailable
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=mold)
if(FLAG_SUPPORTED_fuse_ld_mold)
message(STATUS "Using mold linker")
else()
# Does not support GCC+LTO
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=lld)
if(FLAG_SUPPORTED_fuse_ld_lld)
message(STATUS "Using lld linker")
else()
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
if(FLAG_SUPPORTED_fuse_ld_gold)
message(STATUS "Using gold linker")
endif()
endif()
if(NOT MSVC AND NOT HAIKU)
IF(NOT TARGET_OS STREQUAL "mac")
if(NOT FUSE_LD STREQUAL OFF)
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=${FUSE_LD})
if(FLAG_SUPPORTED_fuse_ld_${FUSE_LD})
message(STATUS "Using ${FUSE_LD} linker")
endif()
else()
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
if(FLAG_SUPPORTED_fuse_ld_gold)
message(STATUS "Using gold linker")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT ENABLE_IPO)
# GCC+LTO: pthread_create has failed: Resource temporarily unavailable
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=mold)
if(FLAG_SUPPORTED_fuse_ld_mold)
message(STATUS "Using mold linker")
else()
# Does not support GCC+LTO
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=lld)
if(FLAG_SUPPORTED_fuse_ld_lld)
message(STATUS "Using lld linker")
else()
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
if(FLAG_SUPPORTED_fuse_ld_gold)
message(STATUS "Using gold linker")
endif()
endif()
endif()
else()
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
if(FLAG_SUPPORTED_fuse_ld_gold)
message(STATUS "Using gold linker")
endif()
endif()
endif()
endif()