mirror of https://github.com/zeldaret/botw.git
build: allow specifying custom linker flags
This is useful for people who want to link using recent versions of mold which are smart enough to e.g. optimise GOT loads; we need to pass --no-relax to disable those optimisations in order to get matching instructions.
This commit is contained in:
parent
f62a726266
commit
00568fbbab
|
@ -41,6 +41,9 @@ add_link_options(-fPIC -Wl,-Bsymbolic-functions -shared)
|
|||
if (DEFINED UKING_LINKER)
|
||||
message(STATUS "Using custom linker: ${UKING_LINKER}")
|
||||
add_link_options(-fuse-ld=${UKING_LINKER})
|
||||
if (DEFINED UKING_LINKER_FLAGS)
|
||||
add_link_options(${UKING_LINKER_FLAGS})
|
||||
endif()
|
||||
else()
|
||||
# Use lld for performance reasons (and because we don't want a dependency on GNU tools)
|
||||
add_link_options(-fuse-ld=lld)
|
||||
|
|
Loading…
Reference in New Issue