Skip to content

Commit

Permalink
chore(build): build -fPIC for improved shared library support
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Nov 4, 2023
1 parent a5cdce4 commit c1f4fbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion support/BuildSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endfunction()
## COMPILE(list): A list containing the compiler flags
## LINK(list): A list containing the linker flags
function(bs_internal_select_cflags_gcc SANITIZERS COMPILE LINK)
list(APPEND _INTERNAL_FLAGS "-Wall" "-Wextra" "-Werror" "-Wconversion" "-Wshadow" "-Wpedantic")
list(APPEND _INTERNAL_FLAGS "-Wall" "-Wextra" "-Werror" "-Wconversion" "-Wshadow" "-Wpedantic" "-fPIC")

if (CMAKE_BUILD_TYPE MATCHES "^Debug" AND ${SANITIZERS} AND NOT WIN32)
list(APPEND _INTERNAL_FLAGS "-fsanitize=address" "-fsanitize=undefined" "-fsanitize=leak")
Expand Down

0 comments on commit c1f4fbe

Please sign in to comment.