Avoid passing -fuse-ld to non-linking step

This commit is contained in:
RipleyTom 2025-04-26 20:17:16 +02:00 committed by Megamouse
parent 39d3754b18
commit 929a92f6c5
3 changed files with 12 additions and 5 deletions

View file

@ -93,6 +93,9 @@ else()
add_compile_options(-Wno-class-memaccess)
endif()
# Note that this refers to binary size optimization during linking, it differs from optimization compiler level
add_link_options(-Wl,-O2)
if(NOT APPLE AND NOT WIN32)
# This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts.
add_link_options(-Wl,--exclude-libs,ALL)