Skip to content

Commit

Permalink
Fix linkage if PIE is default
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Sep 25, 2024
1 parent 7e01a65 commit 92180ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ function(add_precompiled_vulkan_spirv target)
endfunction()

function(target_base_address target address)
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE off)

if(CMAKE_CXX_COMPILER_LINKER_ID MATCHES "^(LLD|MOLD)$")
target_link_options(${target} PUBLIC "LINKER:--image-base=${address}")
else()
Expand Down

0 comments on commit 92180ff

Please sign in to comment.