summaryrefslogtreecommitdiff
path: root/functions.cmake
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2018-07-12 23:45:39 -0700
committerGitHub <noreply@github.com>2018-07-12 23:45:39 -0700
commitb89e2305a2c953272c997242d01b66b1bb1e661e (patch)
treeb4064df6f0917351a74722c91d9928789e53c8cc /functions.cmake
parent0e22b107e811bc8ab7f3c1caf0943ef760d9f53d (diff)
downloadcoreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.gz
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.bz2
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.zip
Add prefix to DAC's PAL exports for alpine (#18873)
Added some cmake logic to create assembly include mapping files. One that maps the prefixed name (DAC_foo) to the actual name (foo) which is included in the DAC module and another that maps the actual name to the prefixed name that is included in the SOS, DBI and createdump modules. The data exports like IID_IUnknown are not prefixed and don't need to be (immutable static data). There were some C++ exports functions exported with their decorated names in the CatchHardwareExceptionHolder and NativeExceptionHolderBase classes. Created PAL_* style export functions that implements the code. Fix lldb plugin cmake file to use LLDB_H/LLDB_LIB env vars to build it.
Diffstat (limited to 'functions.cmake')
-rw-r--r--functions.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/functions.cmake b/functions.cmake
index c2286839dd..d868445910 100644
--- a/functions.cmake
+++ b/functions.cmake
@@ -107,6 +107,27 @@ function(generate_exports_file)
PROPERTIES GENERATED TRUE)
endfunction()
+function(generate_exports_file_prefix inputFilename outputFilename prefix)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ set(AWK_SCRIPT generateexportedsymbols.awk)
+ else()
+ set(AWK_SCRIPT generateversionscript.awk)
+ if (NOT ${prefix} STREQUAL "")
+ set(AWK_VARS ${AWK_VARS} -v prefix=${prefix})
+ endif()
+ endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+
+ add_custom_command(
+ OUTPUT ${outputFilename}
+ COMMAND ${AWK} -f ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT} ${AWK_VARS} ${inputFilename} >${outputFilename}
+ DEPENDS ${inputFilename} ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT}
+ COMMENT "Generating exports file ${outputFilename}"
+ )
+ set_source_files_properties(${outputFilename}
+ PROPERTIES GENERATED TRUE)
+endfunction()
+
function(add_precompiled_header header cppFile targetSources)
if(MSVC)
set(precompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/stdafx.pch")