From b89e2305a2c953272c997242d01b66b1bb1e661e Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Thu, 12 Jul 2018 23:45:39 -0700 Subject: 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. --- functions.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'functions.cmake') 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") -- cgit v1.2.3