From 43ae9afecb6f8307afe91d73bff7435176beef56 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid Date: Fri, 19 Jun 2020 15:50:20 +0300 Subject: Add support for illumos cross-compilation (#37753) --- eng/native/functions.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'eng/native/functions.cmake') 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) -- cgit v1.2.3