Skip to content

Commit

Permalink
Try #1599:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jun 28, 2021
2 parents b20c13b + a0257dd commit 35a7475
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,18 @@ else()
set_arch_target(ARB_CXXOPT_ARCH ${ARB_ARCH})
set(ARB_CXX_FLAGS_TARGET_FULL ${ARB_CXX_FLAGS_TARGET} ${ARB_CXXOPT_ARCH})
endif()

# Compile with `-fvisibility=hidden` to ensure that the symbols of the generated
# arbor static libraries are hidden from the dynamic symbol tables of any shared
# libraries that link against them.
list(APPEND ARB_CXX_FLAGS_TARGET_FULL
"$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CXX>>:-fvisibility=hidden>"
"$<$<BUILD_INTERFACE:$<COMPILE_LANGUAGE:CUDA>>:-Xcompiler=-fvisibility=hidden>")
separate_arguments(ARB_CXX_FLAGS_TARGET_FULL)

target_compile_options(arbor-private-deps INTERFACE ${ARB_CXX_FLAGS_TARGET_FULL})
target_compile_options(arborenv-private-deps INTERFACE ${ARB_CXX_FLAGS_TARGET_FULL})
target_compile_options(arborio-private-deps INTERFACE ${ARB_CXX_FLAGS_TARGET_FULL})

# Profiling and test features
#-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion mechanisms/generate_catalogue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const mechanism_catalogue& global_${catalogue}_catalogue() {
#ifdef STANDALONE
extern "C" {
const void* get_catalogue() {
__attribute__ ((visibility ("default"))) const void* get_catalogue() {
static auto cat = arb::build_${catalogue}_catalogue();
return (void*)&cat;
}
Expand Down

0 comments on commit 35a7475

Please sign in to comment.