Turn off symbol export to prevent method\data collisions when loading dlls dynamicall...
authorSteve Harter <steveharter@users.noreply.github.com>
Mon, 5 Mar 2018 15:50:41 +0000 (09:50 -0600)
committerGitHub <noreply@github.com>
Mon, 5 Mar 2018 15:50:41 +0000 (09:50 -0600)
Commit migrated from https://github.com/dotnet/core-setup/commit/a28fbb812d99243c3b574ca67ed0c1c2d6061ffb

src/installer/corehost/cli/dll/CMakeLists.txt
src/installer/corehost/cli/exe/apphost/CMakeLists.txt
src/installer/corehost/cli/exe/dotnet/CMakeLists.txt
src/installer/corehost/cli/fxr/CMakeLists.txt
src/installer/corehost/common/pal.h

index 46ddc40..f342313 100644 (file)
@@ -12,6 +12,8 @@ else()
     add_compile_options(-fPIC)
 endif()
 
+add_compile_options(-fvisibility=hidden)
+
 include(../setup.cmake)
 
 # Include directories
index 0dd8585..617d88d 100644 (file)
@@ -5,6 +5,8 @@ cmake_minimum_required (VERSION 2.6)
 project(apphost)
 set(DOTNET_HOST_EXE_NAME "apphost")
 
+add_compile_options(-fvisibility=hidden)
+
 # Add RPATH to the apphost binary that allows using local copies of shared libraries
 # dotnet core depends on for special scenarios when system wide installation of such 
 # dependencies is not possible for some reason.
index b8b0763..a0de6e1 100644 (file)
@@ -4,6 +4,7 @@
 cmake_minimum_required (VERSION 2.6)
 project(dotnet)
 set(DOTNET_HOST_EXE_NAME "dotnet")
+add_compile_options(-fvisibility=hidden)
 set(SOURCES 
     ../../fxr/fx_ver.cpp)
 include(../exe.cmake)
index ec666f8..822f236 100644 (file)
@@ -12,6 +12,8 @@ else()
     add_compile_options(-fPIC)
 endif()
 
+add_compile_options(-fvisibility=hidden)
+
 include(../setup.cmake)
 
 # Include directories
index 87c7379..7cdb2ff 100644 (file)
@@ -139,7 +139,7 @@ namespace pal
 
 #else
     #ifdef COREHOST_MAKE_DLL
-        #define SHARED_API extern "C"
+        #define SHARED_API extern "C" __attribute__((__visibility__("default")))
     #else
         #define SHARED_API
     #endif