Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eng/native/functions.cmake')
-rw-r--r--eng/native/functions.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
index 49b0064499e..44790724ea0 100644
--- a/eng/native/functions.cmake
+++ b/eng/native/functions.cmake
@@ -162,6 +162,20 @@ function(preprocess_compile_asm)
set(${COMPILE_ASM_OUTPUT_OBJECTS} ${ASSEMBLED_OBJECTS} PARENT_SCOPE)
endfunction()
+function(set_exports_linker_option exports_filename)
+ if(LD_GNU OR LD_SOLARIS)
+ # Add linker exports file option
+ if(LD_SOLARIS)
+ set(EXPORTS_LINKER_OPTION -Wl,-M,${exports_filename} PARENT_SCOPE)
+ else()
+ set(EXPORTS_LINKER_OPTION -Wl,--version-script=${exports_filename} PARENT_SCOPE)
+ endif()
+ elseif(LD_OSX)
+ # Add linker exports file option
+ set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${exports_filename} PARENT_SCOPE)
+ endif()
+endfunction()
+
function(generate_exports_file)
set(INPUT_LIST ${ARGN})
list(GET INPUT_LIST -1 outputFilename)