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:
authorAdeel Mujahid <adeelbm@outlook.com>2020-06-19 15:50:20 +0300
committerGitHub <noreply@github.com>2020-06-19 15:50:20 +0300
commit43ae9afecb6f8307afe91d73bff7435176beef56 (patch)
treedce1310ba9d6e6e36dc936ea6f11f1e4f3760406 /eng/native/functions.cmake
parent85a97b64d7a86e1c8747479a7f2c6df19cf3acd6 (diff)
Add support for illumos cross-compilation (#37753)
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)