From df24d2851a9816f7210fbc7c296f7fa447228bd9 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 22 Apr 2023 12:17:59 +0200 Subject: [PATCH 1/6] cmake: modernize cmake code --- CMakeLists.txt | 17 +---------------- CMakePresets.json | 21 +++++++++++++++++++++ sample/CMakeLists.txt | 1 - src/addr2line/CMakeLists.txt | 2 -- src/catchsegv/CMakeLists.txt | 2 -- src/drmingw/CMakeLists.txt | 2 -- src/exchndl/CMakeLists.txt | 2 -- 7 files changed, 22 insertions(+), 25 deletions(-) create mode 100644 CMakePresets.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c63490..8aa0ea6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,21 +49,6 @@ add_compile_options (-fno-strict-aliasing) include (StaticCRT) -# Avoid Posix threads. Posix threads is required for support of certain C++11 -# multi-threading features, but it introduces a new DLL dependency and we don't -# use those features. -# https://github.com/jrfonseca/drmingw/issues/82#issuecomment-1360081041 -execute_process ( - COMMAND "${CMAKE_COMMAND}" -E echo "#include \n#ifdef _GLIBCXX_HAS_GTHREADS\n#error _GLIBCXX_HAS_GTHREADS\n#endif" - COMMAND "${CMAKE_CXX_COMPILER}" -x c++ -E - - RESULT_VARIABLE STATUS_CXX11_THREADS - OUTPUT_QUIET - ERROR_QUIET -) -if (NOT STATUS_CXX11_THREADS EQUAL 0) - message (SEND_ERROR "Win32 threads required.") -endif () - # Enable stack protection # XXX: Broken on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0" OR @@ -177,4 +162,4 @@ set (CPACK_GENERATOR "7Z") set (CPACK_STRIP_FILES ON) -include(CPack) +include(CPack) \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..9af21d1 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,21 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "gcc64", + "generator": "Ninja", + "binaryDir": "build-gcc64", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "gcc32", + "generator": "Ninja", + "binaryDir": "build-gcc32", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ] +} \ No newline at end of file diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index 471579c..de69013 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -3,7 +3,6 @@ force_debug () add_executable (sample sample.cpp ) -add_dependencies (sample exchndl_implib) target_link_libraries (sample PRIVATE exchndl_implib) install (FILES sample.cpp DESTINATION sample) diff --git a/src/addr2line/CMakeLists.txt b/src/addr2line/CMakeLists.txt index 0593521..d8b53b5 100644 --- a/src/addr2line/CMakeLists.txt +++ b/src/addr2line/CMakeLists.txt @@ -2,8 +2,6 @@ add_executable (addr2line addr2line.cpp ) -add_dependencies (addr2line mgwhelp_implib) - target_link_libraries (addr2line common mgwhelp_implib diff --git a/src/catchsegv/CMakeLists.txt b/src/catchsegv/CMakeLists.txt index 1f04c3d..cb1ba84 100644 --- a/src/catchsegv/CMakeLists.txt +++ b/src/catchsegv/CMakeLists.txt @@ -8,8 +8,6 @@ include_directories ( set_property (TARGET catchsegv APPEND_STRING PROPERTY LINK_FLAGS " -municode") -add_dependencies (catchsegv mgwhelp_implib) - target_link_libraries (catchsegv common getoptW diff --git a/src/drmingw/CMakeLists.txt b/src/drmingw/CMakeLists.txt index 9c6f6f5..036a7e2 100644 --- a/src/drmingw/CMakeLists.txt +++ b/src/drmingw/CMakeLists.txt @@ -10,8 +10,6 @@ target_compile_definitions (drmingw PRIVATE VERSION="${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" ) -add_dependencies (drmingw mgwhelp_implib) - target_link_libraries (drmingw common mgwhelp_implib diff --git a/src/exchndl/CMakeLists.txt b/src/exchndl/CMakeLists.txt index a310e36..8ec2f3a 100644 --- a/src/exchndl/CMakeLists.txt +++ b/src/exchndl/CMakeLists.txt @@ -23,8 +23,6 @@ target_sources (exchndl PRIVATE version.rc ) -add_dependencies (exchndl mgwhelp_implib) - target_link_libraries (exchndl PRIVATE common mgwhelp_implib From 811652179bc3c4c77e0b30ec7352670660204c64 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 22 Apr 2023 12:21:08 +0200 Subject: [PATCH 2/6] cmake: improve def files and remove workarounds for old def files --- sample/CMakeLists.txt | 2 +- src/addr2line/CMakeLists.txt | 4 +- src/catchsegv/CMakeLists.txt | 4 +- src/drmingw/CMakeLists.txt | 4 +- src/exchndl/CMakeLists.txt | 18 +----- src/exchndl/exchndl32.def | 6 ++ src/exchndl/exchndl32exp.def | 6 -- src/exchndl/exchndl32imp.def | 6 -- src/mgwhelp/CMakeLists.txt | 17 +----- src/mgwhelp/mgwhelp32.def | 108 ++++++++++++++++++++++++++++++++++ src/mgwhelp/mgwhelp32exp.def | 108 ---------------------------------- src/mgwhelp/mgwhelp32imp.def | 109 ----------------------------------- 12 files changed, 125 insertions(+), 267 deletions(-) create mode 100644 src/exchndl/exchndl32.def delete mode 100644 src/exchndl/exchndl32exp.def delete mode 100644 src/exchndl/exchndl32imp.def create mode 100644 src/mgwhelp/mgwhelp32.def delete mode 100644 src/mgwhelp/mgwhelp32exp.def delete mode 100644 src/mgwhelp/mgwhelp32imp.def diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index de69013..54d6c00 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -3,7 +3,7 @@ force_debug () add_executable (sample sample.cpp ) -target_link_libraries (sample PRIVATE exchndl_implib) +target_link_libraries (sample PRIVATE exchndl) install (FILES sample.cpp DESTINATION sample) install (FILES sample.mak DESTINATION sample RENAME Makefile) diff --git a/src/addr2line/CMakeLists.txt b/src/addr2line/CMakeLists.txt index d8b53b5..36dc3c5 100644 --- a/src/addr2line/CMakeLists.txt +++ b/src/addr2line/CMakeLists.txt @@ -2,9 +2,9 @@ add_executable (addr2line addr2line.cpp ) -target_link_libraries (addr2line +target_link_libraries (addr2line PRIVATE common - mgwhelp_implib + mgwhelp ) install (TARGETS addr2line RUNTIME DESTINATION bin) diff --git a/src/catchsegv/CMakeLists.txt b/src/catchsegv/CMakeLists.txt index cb1ba84..bac0be8 100644 --- a/src/catchsegv/CMakeLists.txt +++ b/src/catchsegv/CMakeLists.txt @@ -8,10 +8,10 @@ include_directories ( set_property (TARGET catchsegv APPEND_STRING PROPERTY LINK_FLAGS " -municode") -target_link_libraries (catchsegv +target_link_libraries (catchsegv PRIVATE common getoptW - mgwhelp_implib + mgwhelp winmm ) diff --git a/src/drmingw/CMakeLists.txt b/src/drmingw/CMakeLists.txt index 036a7e2..06fca18 100644 --- a/src/drmingw/CMakeLists.txt +++ b/src/drmingw/CMakeLists.txt @@ -10,9 +10,9 @@ target_compile_definitions (drmingw PRIVATE VERSION="${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" ) -target_link_libraries (drmingw +target_link_libraries (drmingw PRIVATE common - mgwhelp_implib + mgwhelp ) install (TARGETS drmingw RUNTIME DESTINATION bin) diff --git a/src/exchndl/CMakeLists.txt b/src/exchndl/CMakeLists.txt index 8ec2f3a..43fd5e0 100644 --- a/src/exchndl/CMakeLists.txt +++ b/src/exchndl/CMakeLists.txt @@ -1,21 +1,7 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_C_COMPILER_ID STREQUAL GNU) - # Build import library separately, to deal with MinGW issues - - add_library (exchndl MODULE exchndl32exp.def) - - set (EXCHNDL_IMPLIB ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libexchndl.dll.a) - add_custom_command ( - OUTPUT ${EXCHNDL_IMPLIB} - COMMAND ${CMAKE_DLLTOOL} --output-lib ${EXCHNDL_IMPLIB} --dllname exchndl.dll --kill-at --input-def ${CMAKE_CURRENT_SOURCE_DIR}/exchndl32imp.def - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/exchndl32imp.def - ) - add_custom_target (libexchndl_implib DEPENDS exchndl ${EXCHNDL_IMPLIB}) - add_library (exchndl_implib INTERFACE IMPORTED GLOBAL) - target_link_libraries (exchndl_implib INTERFACE ${EXCHNDL_IMPLIB}) - install (FILES ${EXCHNDL_IMPLIB} DESTINATION lib) + add_library (exchndl SHARED exchndl32.def) else () add_library (exchndl SHARED exchndl64.def) - add_library (exchndl_implib ALIAS exchndl) endif () target_sources (exchndl PRIVATE @@ -25,7 +11,7 @@ target_sources (exchndl PRIVATE target_link_libraries (exchndl PRIVATE common - mgwhelp_implib + mgwhelp ) set_target_properties (exchndl PROPERTIES diff --git a/src/exchndl/exchndl32.def b/src/exchndl/exchndl32.def new file mode 100644 index 0000000..9442061 --- /dev/null +++ b/src/exchndl/exchndl32.def @@ -0,0 +1,6 @@ +LIBRARY exchndl.dll + +EXPORTS + ExcHndlInit@0 == ExcHndlInit + ExcHndlSetLogFileNameA@4 == ExcHndlSetLogFileNameA + ExcHndlSetLogFileNameW@4 == ExcHndlSetLogFileNameW diff --git a/src/exchndl/exchndl32exp.def b/src/exchndl/exchndl32exp.def deleted file mode 100644 index a3e2893..0000000 --- a/src/exchndl/exchndl32exp.def +++ /dev/null @@ -1,6 +0,0 @@ -LIBRARY exchndl.dll - -EXPORTS - ExcHndlInit = ExcHndlInit@0 - ExcHndlSetLogFileNameA = ExcHndlSetLogFileNameA@4 - ExcHndlSetLogFileNameW = ExcHndlSetLogFileNameW@4 diff --git a/src/exchndl/exchndl32imp.def b/src/exchndl/exchndl32imp.def deleted file mode 100644 index 146f9f7..0000000 --- a/src/exchndl/exchndl32imp.def +++ /dev/null @@ -1,6 +0,0 @@ -LIBRARY exchndl.dll - -EXPORTS - ExcHndlInit@0 - ExcHndlSetLogFileNameA@4 - ExcHndlSetLogFileNameW@4 diff --git a/src/mgwhelp/CMakeLists.txt b/src/mgwhelp/CMakeLists.txt index c7541aa..f38339e 100644 --- a/src/mgwhelp/CMakeLists.txt +++ b/src/mgwhelp/CMakeLists.txt @@ -1,21 +1,7 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_C_COMPILER_ID STREQUAL GNU) - # Build import library separately, to deal with MinGW issues - - add_library (mgwhelp MODULE mgwhelp32exp.def) - - set (MGWHELP_IMPLIB ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libmgwhelp.dll.a) - add_custom_command ( - OUTPUT ${MGWHELP_IMPLIB} - COMMAND ${CMAKE_DLLTOOL} --output-lib ${MGWHELP_IMPLIB} --dllname mgwhelp.dll --kill-at --input-def ${CMAKE_CURRENT_SOURCE_DIR}/mgwhelp32imp.def - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/mgwhelp32imp.def - ) - add_custom_target (libmgwhelp_implib DEPENDS mgwhelp ${MGWHELP_IMPLIB}) - add_library (mgwhelp_implib INTERFACE IMPORTED GLOBAL) - target_link_libraries (mgwhelp_implib INTERFACE ${MGWHELP_IMPLIB}) - install (FILES ${MGWHELP_IMPLIB} DESTINATION lib) + add_library (mgwhelp SHARED mgwhelp32.def) else () add_library (mgwhelp SHARED mgwhelp64.def) - add_library (mgwhelp_implib ALIAS mgwhelp) endif () target_sources (mgwhelp PRIVATE @@ -29,6 +15,7 @@ target_link_libraries (mgwhelp PRIVATE common dwarf libiberty + PUBLIC dbghelp ) diff --git a/src/mgwhelp/mgwhelp32.def b/src/mgwhelp/mgwhelp32.def new file mode 100644 index 0000000..dfdf576 --- /dev/null +++ b/src/mgwhelp/mgwhelp32.def @@ -0,0 +1,108 @@ +EXPORTS + SymInitialize@12 = MgwSymInitialize@12 == SymInitialize + SymInitializeW@12 = MgwSymInitializeW@12 == SymInitializeW + SymCleanup@4 = MgwSymCleanup@4 == SymCleanup + SymSetOptions@4 = MgwSymSetOptions@4 == SymSetOptions + SymFromAddr@20 = MgwSymFromAddr@20 == SymFromAddr + SymFromAddrW@20 = MgwSymFromAddrW@20 == SymFromAddrW + SymGetLineFromAddr64@20 = MgwSymGetLineFromAddr64@20 == SymGetLineFromAddr64 + SymGetLineFromAddrW64@20 = MgwSymGetLineFromAddrW64@20 == SymGetLineFromAddrW64 + SymLoadModuleEx@36 = MgwSymLoadModuleEx@36 == SymLoadModuleEx + SymLoadModuleExW@36 = MgwSymLoadModuleExW@36 == SymLoadModuleExW + UnDecorateSymbolName@16 = MgwUnDecorateSymbolName@16 == UnDecorateSymbolName + + EnumDirTree = dbghelp.EnumDirTree + EnumDirTreeW = dbghelp.EnumDirTreeW + EnumerateLoadedModules = dbghelp.EnumerateLoadedModules + EnumerateLoadedModules64 = dbghelp.EnumerateLoadedModules64 + EnumerateLoadedModulesW64 = dbghelp.EnumerateLoadedModulesW64 + ExtensionApiVersion = dbghelp.ExtensionApiVersion + FindDebugInfoFile = dbghelp.FindDebugInfoFile + FindDebugInfoFileEx = dbghelp.FindDebugInfoFileEx + FindExecutableImage = dbghelp.FindExecutableImage + FindExecutableImageEx = dbghelp.FindExecutableImageEx + FindExecutableImageExW = dbghelp.FindExecutableImageExW + GetTimestampForLoadedLibrary = dbghelp.GetTimestampForLoadedLibrary + ImageDirectoryEntryToData = dbghelp.ImageDirectoryEntryToData + ImageDirectoryEntryToDataEx = dbghelp.ImageDirectoryEntryToDataEx + ImageNtHeader = dbghelp.ImageNtHeader + ImageRvaToSection = dbghelp.ImageRvaToSection + ImageRvaToVa = dbghelp.ImageRvaToVa + ImagehlpApiVersion = dbghelp.ImagehlpApiVersion + ImagehlpApiVersionEx = dbghelp.ImagehlpApiVersionEx + MakeSureDirectoryPathExists = dbghelp.MakeSureDirectoryPathExists + MapDebugInformation = dbghelp.MapDebugInformation + MiniDumpReadDumpStream = dbghelp.MiniDumpReadDumpStream + MiniDumpWriteDump = dbghelp.MiniDumpWriteDump + SearchTreeForFile = dbghelp.SearchTreeForFile + SearchTreeForFileW = dbghelp.SearchTreeForFileW + StackWalk = dbghelp.StackWalk + StackWalk64 = dbghelp.StackWalk64 + SymAddSymbol = dbghelp.SymAddSymbol + SymAddSymbolW = dbghelp.SymAddSymbolW + SymEnumLines = dbghelp.SymEnumLines + SymEnumSourceFiles = dbghelp.SymEnumSourceFiles + SymEnumSymbols = dbghelp.SymEnumSymbols + SymEnumSymbolsW = dbghelp.SymEnumSymbolsW + SymEnumTypes = dbghelp.SymEnumTypes + SymEnumTypesW = dbghelp.SymEnumTypesW + SymEnumerateModules = dbghelp.SymEnumerateModules + SymEnumerateModules64 = dbghelp.SymEnumerateModules64 + SymEnumerateModulesW64 = dbghelp.SymEnumerateModulesW64 + SymEnumerateSymbols = dbghelp.SymEnumerateSymbols + SymEnumerateSymbols64 = dbghelp.SymEnumerateSymbols64 + SymFindFileInPath = dbghelp.SymFindFileInPath + SymFindFileInPathW = dbghelp.SymFindFileInPathW + SymFromName = dbghelp.SymFromName + SymFunctionTableAccess = dbghelp.SymFunctionTableAccess + SymFunctionTableAccess64 = dbghelp.SymFunctionTableAccess64 + SymGetLineFromAddr = dbghelp.SymGetLineFromAddr + SymGetLineNext = dbghelp.SymGetLineNext + SymGetLineNext64 = dbghelp.SymGetLineNext64 + SymGetLinePrev = dbghelp.SymGetLinePrev + SymGetLinePrev64 = dbghelp.SymGetLinePrev64 + SymGetModuleBase = dbghelp.SymGetModuleBase + SymGetModuleBase64 = dbghelp.SymGetModuleBase64 + SymGetModuleInfo = dbghelp.SymGetModuleInfo + SymGetModuleInfo64 = dbghelp.SymGetModuleInfo64 + SymGetModuleInfoW = dbghelp.SymGetModuleInfoW + SymGetModuleInfoW64 = dbghelp.SymGetModuleInfoW64 + SymGetOptions = dbghelp.SymGetOptions + SymGetSearchPath = dbghelp.SymGetSearchPath + SymGetSearchPathW = dbghelp.SymGetSearchPathW + SymGetSourceFileToken = dbghelp.SymGetSourceFileToken + SymGetSourceFileTokenW = dbghelp.SymGetSourceFileTokenW + SymGetSymFromAddr = dbghelp.SymGetSymFromAddr + SymGetSymFromAddr64 = dbghelp.SymGetSymFromAddr64 + SymGetSymFromName = dbghelp.SymGetSymFromName + SymGetSymFromName64 = dbghelp.SymGetSymFromName64 + SymGetSymNext = dbghelp.SymGetSymNext + SymGetSymNext64 = dbghelp.SymGetSymNext64 + SymGetSymPrev = dbghelp.SymGetSymPrev + SymGetSymPrev64 = dbghelp.SymGetSymPrev64 + SymGetTypeFromName = dbghelp.SymGetTypeFromName + SymGetTypeInfo = dbghelp.SymGetTypeInfo + SymLoadModule = dbghelp.SymLoadModule + SymLoadModule64 = dbghelp.SymLoadModule64 + SymMatchFileName = dbghelp.SymMatchFileName + SymMatchFileNameW = dbghelp.SymMatchFileNameW + SymMatchString = dbghelp.SymMatchString + SymRefreshModuleList = dbghelp.SymRefreshModuleList + SymRegisterCallback = dbghelp.SymRegisterCallback + SymRegisterCallback64 = dbghelp.SymRegisterCallback64 + SymRegisterCallbackW64 = dbghelp.SymRegisterCallbackW64 + SymRegisterFunctionEntryCallback = dbghelp.SymRegisterFunctionEntryCallback + SymRegisterFunctionEntryCallback64 = dbghelp.SymRegisterFunctionEntryCallback64 + SymSearch = dbghelp.SymSearch + SymSearchW = dbghelp.SymSearchW + SymSetContext = dbghelp.SymSetContext + SymSetParentWindow = dbghelp.SymSetParentWindow + SymSetScopeFromAddr = dbghelp.SymSetScopeFromAddr + SymSetSearchPath = dbghelp.SymSetSearchPath + SymSetSearchPathW = dbghelp.SymSetSearchPathW + SymUnDName = dbghelp.SymUnDName + SymUnDName64 = dbghelp.SymUnDName64 + SymUnloadModule = dbghelp.SymUnloadModule + SymUnloadModule64 = dbghelp.SymUnloadModule64 + UnmapDebugInformation = dbghelp.UnmapDebugInformation + WinDbgExtensionDllInit = dbghelp.WinDbgExtensionDllInit diff --git a/src/mgwhelp/mgwhelp32exp.def b/src/mgwhelp/mgwhelp32exp.def deleted file mode 100644 index 91cee47..0000000 --- a/src/mgwhelp/mgwhelp32exp.def +++ /dev/null @@ -1,108 +0,0 @@ -EXPORTS - SymInitialize = MgwSymInitialize@12 - SymInitializeW = MgwSymInitializeW@12 - SymCleanup = MgwSymCleanup@4 - SymSetOptions = MgwSymSetOptions@4 - SymFromAddr = MgwSymFromAddr@20 - SymFromAddrW = MgwSymFromAddrW@20 - SymGetLineFromAddr64 = MgwSymGetLineFromAddr64@20 - SymGetLineFromAddrW64 = MgwSymGetLineFromAddrW64@20 - SymLoadModuleEx = MgwSymLoadModuleEx@36 - SymLoadModuleExW = MgwSymLoadModuleExW@36 - UnDecorateSymbolName = MgwUnDecorateSymbolName@16 - - EnumDirTree = EnumDirTree@24 - EnumDirTreeW = EnumDirTreeW@24 - EnumerateLoadedModules = EnumerateLoadedModules@12 - EnumerateLoadedModules64 = EnumerateLoadedModules64@12 - EnumerateLoadedModulesW64 = EnumerateLoadedModulesW64@12 - ExtensionApiVersion = ExtensionApiVersion@0 - FindDebugInfoFile = FindDebugInfoFile@12 - FindDebugInfoFileEx = FindDebugInfoFileEx@20 - FindExecutableImage = FindExecutableImage@12 - FindExecutableImageEx = FindExecutableImageEx@20 - FindExecutableImageExW = FindExecutableImageExW@20 - GetTimestampForLoadedLibrary = GetTimestampForLoadedLibrary@4 - ImageDirectoryEntryToData = ImageDirectoryEntryToData@16 - ImageDirectoryEntryToDataEx = ImageDirectoryEntryToDataEx@20 - ImageNtHeader = ImageNtHeader@4 - ImageRvaToSection = ImageRvaToSection@12 - ImageRvaToVa = ImageRvaToVa@16 - ImagehlpApiVersion = ImagehlpApiVersion@0 - ImagehlpApiVersionEx = ImagehlpApiVersionEx@4 - MakeSureDirectoryPathExists = MakeSureDirectoryPathExists@4 - MapDebugInformation = MapDebugInformation@16 - MiniDumpReadDumpStream = MiniDumpReadDumpStream@20 - MiniDumpWriteDump = MiniDumpWriteDump@28 - SearchTreeForFile = SearchTreeForFile@12 - SearchTreeForFileW = SearchTreeForFileW@12 - StackWalk = StackWalk@36 - StackWalk64 = StackWalk64@36 - SymAddSymbol = SymAddSymbol@32 - SymAddSymbolW = SymAddSymbolW@32 - SymEnumLines = SymEnumLines@28 - SymEnumSourceFiles = SymEnumSourceFiles@24 - SymEnumSymbols = SymEnumSymbols@24 - SymEnumSymbolsW = SymEnumSymbolsW@24 - SymEnumTypes = SymEnumTypes@20 - SymEnumTypesW = SymEnumTypesW@20 - SymEnumerateModules = SymEnumerateModules@12 - SymEnumerateModules64 = SymEnumerateModules64@12 - SymEnumerateModulesW64 = SymEnumerateModulesW64@12 - SymEnumerateSymbols = SymEnumerateSymbols@16 - SymEnumerateSymbols64 = SymEnumerateSymbols64@20 - SymFindFileInPath = SymFindFileInPath@40 - SymFindFileInPathW = SymFindFileInPathW@40 - SymFromName = SymFromName@12 - SymFunctionTableAccess = SymFunctionTableAccess@8 - SymFunctionTableAccess64 = SymFunctionTableAccess64@12 - SymGetLineFromAddr = SymGetLineFromAddr@16 - SymGetLineNext = SymGetLineNext@8 - SymGetLineNext64 = SymGetLineNext64@8 - SymGetLinePrev = SymGetLinePrev@8 - SymGetLinePrev64 = SymGetLinePrev64@8 - SymGetModuleBase = SymGetModuleBase@8 - SymGetModuleBase64 = SymGetModuleBase64@12 - SymGetModuleInfo = SymGetModuleInfo@12 - SymGetModuleInfo64 = SymGetModuleInfo64@16 - SymGetModuleInfoW = SymGetModuleInfoW@12 - SymGetModuleInfoW64 = SymGetModuleInfoW64@16 - SymGetOptions = SymGetOptions@0 - SymGetSearchPath = SymGetSearchPath@12 - SymGetSearchPathW = SymGetSearchPathW@12 - SymGetSourceFileToken = SymGetSourceFileToken@24 - SymGetSourceFileTokenW = SymGetSourceFileTokenW@24 - SymGetSymFromAddr = SymGetSymFromAddr@16 - SymGetSymFromAddr64 = SymGetSymFromAddr64@20 - SymGetSymFromName = SymGetSymFromName@12 - SymGetSymFromName64 = SymGetSymFromName64@12 - SymGetSymNext = SymGetSymNext@8 - SymGetSymNext64 = SymGetSymNext64@8 - SymGetSymPrev = SymGetSymPrev@8 - SymGetSymPrev64 = SymGetSymPrev64@8 - SymGetTypeFromName = SymGetTypeFromName@20 - SymGetTypeInfo = SymGetTypeInfo@24 - SymLoadModule = SymLoadModule@24 - SymLoadModule64 = SymLoadModule64@28 - SymMatchFileName = SymMatchFileName@16 - SymMatchFileNameW = SymMatchFileNameW@16 - SymMatchString = SymMatchString@12 - SymRefreshModuleList = SymRefreshModuleList@4 - SymRegisterCallback = SymRegisterCallback@12 - SymRegisterCallback64 = SymRegisterCallback64@16 - SymRegisterCallbackW64 = SymRegisterCallbackW64@16 - SymRegisterFunctionEntryCallback = SymRegisterFunctionEntryCallback@12 - SymRegisterFunctionEntryCallback64 = SymRegisterFunctionEntryCallback64@16 - SymSearch = SymSearch@44 - SymSearchW = SymSearchW@44 - SymSetContext = SymSetContext@12 - SymSetParentWindow = SymSetParentWindow@4 - SymSetScopeFromAddr = SymSetScopeFromAddr@12 - SymSetSearchPath = SymSetSearchPath@8 - SymSetSearchPathW = SymSetSearchPathW@8 - SymUnDName = SymUnDName@12 - SymUnDName64 = SymUnDName64@12 - SymUnloadModule = SymUnloadModule@8 - SymUnloadModule64 = SymUnloadModule64@12 - UnmapDebugInformation = UnmapDebugInformation@4 - WinDbgExtensionDllInit = WinDbgExtensionDllInit@12 diff --git a/src/mgwhelp/mgwhelp32imp.def b/src/mgwhelp/mgwhelp32imp.def deleted file mode 100644 index 4e3da3d..0000000 --- a/src/mgwhelp/mgwhelp32imp.def +++ /dev/null @@ -1,109 +0,0 @@ -LIBRARY mgwhelp.dll - -EXPORTS - EnumDirTree@24 - EnumDirTreeW@24 - EnumerateLoadedModules@12 - EnumerateLoadedModules64@12 - EnumerateLoadedModulesW64@12 - ExtensionApiVersion@0 - FindDebugInfoFile@12 - FindDebugInfoFileEx@20 - FindExecutableImage@12 - FindExecutableImageEx@20 - FindExecutableImageExW@20 - GetTimestampForLoadedLibrary@4 - ImageDirectoryEntryToData@16 - ImageDirectoryEntryToDataEx@20 - ImageNtHeader@4 - ImageRvaToSection@12 - ImageRvaToVa@16 - ImagehlpApiVersion@0 - ImagehlpApiVersionEx@4 - MakeSureDirectoryPathExists@4 - MapDebugInformation@16 - MiniDumpReadDumpStream@20 - MiniDumpWriteDump@28 - SearchTreeForFile@12 - SearchTreeForFileW@12 - StackWalk@36 - StackWalk64@36 - SymAddSymbol@32 - SymAddSymbolW@32 - SymCleanup@4 - SymEnumLines@28 - SymEnumSourceFiles@24 - SymEnumSymbols@24 - SymEnumSymbolsW@24 - SymEnumTypes@20 - SymEnumTypesW@20 - SymEnumerateModules@12 - SymEnumerateModules64@12 - SymEnumerateModulesW64@12 - SymEnumerateSymbols@16 - SymEnumerateSymbols64@20 - SymFindFileInPath@40 - SymFindFileInPathW@40 - SymFromAddr@20 - SymFromAddrW@20 - SymFromName@12 - SymFunctionTableAccess@8 - SymFunctionTableAccess64@12 - SymGetLineFromAddr@16 - SymGetLineFromAddr64@20 - SymGetLineFromAddrW64@20 - SymGetLineNext@8 - SymGetLineNext64@8 - SymGetLinePrev@8 - SymGetLinePrev64@8 - SymGetModuleBase@8 - SymGetModuleBase64@12 - SymGetModuleInfo@12 - SymGetModuleInfo64@16 - SymGetModuleInfoW@12 - SymGetModuleInfoW64@16 - SymGetOptions@0 - SymGetSearchPath@12 - SymGetSearchPathW@12 - SymGetSourceFileToken@24 - SymGetSourceFileTokenW@24 - SymGetSymFromAddr@16 - SymGetSymFromAddr64@20 - SymGetSymFromName@12 - SymGetSymFromName64@12 - SymGetSymNext@8 - SymGetSymNext64@8 - SymGetSymPrev@8 - SymGetSymPrev64@8 - SymGetTypeFromName@20 - SymGetTypeInfo@24 - SymInitialize@12 - SymInitializeW@12 - SymLoadModule@24 - SymLoadModule64@28 - SymLoadModuleEx@36 - SymLoadModuleExW@36 - SymMatchFileName@16 - SymMatchFileNameW@16 - SymMatchString@12 - SymRefreshModuleList@4 - SymRegisterCallback@12 - SymRegisterCallback64@16 - SymRegisterCallbackW64@16 - SymRegisterFunctionEntryCallback@12 - SymRegisterFunctionEntryCallback64@16 - SymSearch@44 - SymSearchW@44 - SymSetContext@12 - SymSetOptions@4 - SymSetParentWindow@4 - SymSetScopeFromAddr@12 - SymSetSearchPath@8 - SymSetSearchPathW@8 - SymUnDName@12 - SymUnDName64@12 - SymUnloadModule@8 - SymUnloadModule64@12 - UnDecorateSymbolName@16 - UnmapDebugInformation@4 - WinDbgExtensionDllInit@12 From 3634cee126565dbcd2baed94222a567db9b64c16 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 22 Apr 2023 12:37:06 +0200 Subject: [PATCH 3/6] cmake: update dependencies in test files --- tests/CMakeLists.txt | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cf6a54a..ba098b6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,12 +8,10 @@ force_debug () add_executable (test_mgwhelp test_mgwhelp.cpp ) -add_dependencies (test_mgwhelp mgwhelp_implib) target_link_libraries (test_mgwhelp - mgwhelp_implib + mgwhelp shlwapi ) -add_dependencies (check test_mgwhelp) add_test ( NAME test_mgwhelp COMMAND test_mgwhelp @@ -45,7 +43,6 @@ add_custom_target (test_mgwhelp_split ALL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split.debug ) -add_dependencies (check test_mgwhelp_split) add_test ( NAME test_mgwhelp_split COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split.exe @@ -81,7 +78,6 @@ add_custom_target (test_mgwhelp_split_subdir ALL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split_subdir.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/.debug/test_mgwhelp_split_subdir.debug ) -add_dependencies (check test_mgwhelp_split_subdir) add_test ( NAME test_mgwhelp_split_subdir COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split_subdir.exe @@ -105,7 +101,6 @@ add_custom_target (test_mgwhelp_stripped ALL DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_stripped.exe ) -add_dependencies (check test_mgwhelp_stripped) add_test ( NAME test_mgwhelp_stripped COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_stripped.exe @@ -186,7 +181,6 @@ endif () if (OBJCOPY_VERSION STREQUAL "llvm-objcopy") set_target_properties (test_mgwhelp_zdebug PROPERTIES EXCLUDE_FROM_ALL ON) else () - add_dependencies (check test_mgwhelp_zdebug) endif () if (OBJCOPY_VERSION STREQUAL "llvm-objcopy" OR OBJCOPY_VERSION VERSION_LESS "2.34") set_tests_properties (test_mgwhelp_zdebug PROPERTIES DISABLED ON) @@ -203,9 +197,7 @@ include_directories ( add_executable (test_exchndl_static_unicode test_exchndl_static_unicode.cpp ) -add_dependencies (test_exchndl_static_unicode exchndl_implib) -target_link_libraries (test_exchndl_static_unicode exchndl_implib shlwapi) -add_dependencies (check test_exchndl_static_unicode) +target_link_libraries (test_exchndl_static_unicode exchndl shlwapi) add_test ( NAME test_exchndl_static_unicode COMMAND test_exchndl_static_unicode @@ -223,9 +215,7 @@ include_directories ( add_executable (test_exchndl_static_ansi test_exchndl_static_ansi.cpp ) -add_dependencies (test_exchndl_static_ansi exchndl_implib) -target_link_libraries (test_exchndl_static_ansi exchndl_implib shlwapi) -add_dependencies (check test_exchndl_static_ansi) +target_link_libraries (test_exchndl_static_ansi exchndl shlwapi) add_test ( NAME test_exchndl_static_ansi COMMAND test_exchndl_static_ansi @@ -244,8 +234,6 @@ add_executable (test_exchndl_dynamic_unicode test_exchndl_dynamic_unicode.cpp ) target_link_libraries (test_exchndl_dynamic_unicode shlwapi) -add_dependencies (test_exchndl_dynamic_unicode exchndl) -add_dependencies (check test_exchndl_dynamic_unicode) add_test ( NAME test_exchndl_dynamic_unicode COMMAND test_exchndl_dynamic_unicode @@ -264,8 +252,6 @@ add_executable (test_exchndl_dynamic_ansi test_exchndl_dynamic_ansi.cpp ) target_link_libraries (test_exchndl_dynamic_ansi shlwapi) -add_dependencies (test_exchndl_dynamic_ansi exchndl) -add_dependencies (check test_exchndl_dynamic_ansi) add_test ( NAME test_exchndl_dynamic_ansi COMMAND test_exchndl_dynamic_ansi @@ -280,8 +266,6 @@ add_test ( add_executable (test_addr2line test_addr2line.cpp ) -add_dependencies (test_addr2line addr2line) -add_dependencies (check test_addr2line) add_test ( NAME test_addr2line COMMAND test_addr2line From f211f89794e02f0d73138359e48e68fbe41be2d1 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 22 Apr 2023 12:37:47 +0200 Subject: [PATCH 4/6] cmake: modernize cmake code in tests folder --- tests/CMakeLists.txt | 22 +++++++++++++++++++--- tests/apps/CMakeLists.txt | 6 ++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ba098b6..a770b38 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,5 @@ force_debug () - # # test_mgwhelp # @@ -16,6 +15,7 @@ add_test ( NAME test_mgwhelp COMMAND test_mgwhelp ) +set_tests_properties(test_mgwhelp PROPERTIES FIXTURES_REQUIRED test_fixture) # # test_mgwhelp_split @@ -47,6 +47,7 @@ add_test ( NAME test_mgwhelp_split COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split.exe ) +set_tests_properties(test_mgwhelp_split PROPERTIES FIXTURES_REQUIRED test_fixture) # @@ -82,7 +83,7 @@ add_test ( NAME test_mgwhelp_split_subdir COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_split_subdir.exe ) - +set_tests_properties(test_mgwhelp_split_subdir PROPERTIES FIXTURES_REQUIRED test_fixture) # # test_mgwhelp_stripped @@ -105,13 +106,13 @@ add_test ( NAME test_mgwhelp_stripped COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_stripped.exe ) +set_tests_properties(test_mgwhelp_stripped PROPERTIES FIXTURES_REQUIRED test_fixture) # # test_mgwhelp_zdebug # -option (ENABLE_ZDEBUG_TEST "Enable compressed debug sections test." OFF) add_custom_command ( OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_zdebug.debug COMMAND ${CMAKE_OBJCOPY} --only-keep-debug --compress-debug-sections $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_mgwhelp_zdebug.debug @@ -181,6 +182,7 @@ endif () if (OBJCOPY_VERSION STREQUAL "llvm-objcopy") set_target_properties (test_mgwhelp_zdebug PROPERTIES EXCLUDE_FROM_ALL ON) else () + set_tests_properties(test_mgwhelp_zdebug PROPERTIES FIXTURES_REQUIRED test_fixture) endif () if (OBJCOPY_VERSION STREQUAL "llvm-objcopy" OR OBJCOPY_VERSION VERSION_LESS "2.34") set_tests_properties (test_mgwhelp_zdebug PROPERTIES DISABLED ON) @@ -203,6 +205,7 @@ add_test ( COMMAND test_exchndl_static_unicode WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) +set_tests_properties(test_exchndl_static_unicode PROPERTIES FIXTURES_REQUIRED test_fixture) # @@ -221,6 +224,7 @@ add_test ( COMMAND test_exchndl_static_ansi WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) +set_tests_properties(test_exchndl_static_ansi PROPERTIES FIXTURES_REQUIRED test_fixture) # @@ -239,6 +243,7 @@ add_test ( COMMAND test_exchndl_dynamic_unicode WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) +set_tests_properties(test_exchndl_dynamic_unicode PROPERTIES FIXTURES_REQUIRED test_fixture) # @@ -257,6 +262,7 @@ add_test ( COMMAND test_exchndl_dynamic_ansi WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) +set_tests_properties(test_exchndl_dynamic_ansi PROPERTIES FIXTURES_REQUIRED test_fixture) # @@ -271,3 +277,13 @@ add_test ( COMMAND test_addr2line WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) +set_tests_properties(test_addr2line PROPERTIES FIXTURES_REQUIRED test_fixture) + +add_test(test_build + "${CMAKE_COMMAND}" + --build "${CMAKE_BINARY_DIR}" + --config "$" + --target all +) + +set_tests_properties(test_build PROPERTIES FIXTURES_SETUP test_fixture) diff --git a/tests/apps/CMakeLists.txt b/tests/apps/CMakeLists.txt index 40f5fdb..b16f71c 100644 --- a/tests/apps/CMakeLists.txt +++ b/tests/apps/CMakeLists.txt @@ -37,6 +37,12 @@ if (MINGW) set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer") set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer") + + add_link_options( + -static + -static-libgcc + -static-libstdc++ + ) endif () # https://github.com/jrfonseca/drmingw/issues/42 From 343cd2e4966e3e37a689d3fc93a52b250b4a3a0e Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 9 Dec 2023 17:33:40 +0100 Subject: [PATCH 5/6] try to fix mgwhelp32.def --- src/mgwhelp/CMakeLists.txt | 1 - src/mgwhelp/mgwhelp32.def | 190 ++++++++++++++++++------------------- 2 files changed, 95 insertions(+), 96 deletions(-) diff --git a/src/mgwhelp/CMakeLists.txt b/src/mgwhelp/CMakeLists.txt index f38339e..ea1702f 100644 --- a/src/mgwhelp/CMakeLists.txt +++ b/src/mgwhelp/CMakeLists.txt @@ -15,7 +15,6 @@ target_link_libraries (mgwhelp PRIVATE common dwarf libiberty - PUBLIC dbghelp ) diff --git a/src/mgwhelp/mgwhelp32.def b/src/mgwhelp/mgwhelp32.def index dfdf576..9e8d0a1 100644 --- a/src/mgwhelp/mgwhelp32.def +++ b/src/mgwhelp/mgwhelp32.def @@ -11,98 +11,98 @@ EXPORTS SymLoadModuleExW@36 = MgwSymLoadModuleExW@36 == SymLoadModuleExW UnDecorateSymbolName@16 = MgwUnDecorateSymbolName@16 == UnDecorateSymbolName - EnumDirTree = dbghelp.EnumDirTree - EnumDirTreeW = dbghelp.EnumDirTreeW - EnumerateLoadedModules = dbghelp.EnumerateLoadedModules - EnumerateLoadedModules64 = dbghelp.EnumerateLoadedModules64 - EnumerateLoadedModulesW64 = dbghelp.EnumerateLoadedModulesW64 - ExtensionApiVersion = dbghelp.ExtensionApiVersion - FindDebugInfoFile = dbghelp.FindDebugInfoFile - FindDebugInfoFileEx = dbghelp.FindDebugInfoFileEx - FindExecutableImage = dbghelp.FindExecutableImage - FindExecutableImageEx = dbghelp.FindExecutableImageEx - FindExecutableImageExW = dbghelp.FindExecutableImageExW - GetTimestampForLoadedLibrary = dbghelp.GetTimestampForLoadedLibrary - ImageDirectoryEntryToData = dbghelp.ImageDirectoryEntryToData - ImageDirectoryEntryToDataEx = dbghelp.ImageDirectoryEntryToDataEx - ImageNtHeader = dbghelp.ImageNtHeader - ImageRvaToSection = dbghelp.ImageRvaToSection - ImageRvaToVa = dbghelp.ImageRvaToVa - ImagehlpApiVersion = dbghelp.ImagehlpApiVersion - ImagehlpApiVersionEx = dbghelp.ImagehlpApiVersionEx - MakeSureDirectoryPathExists = dbghelp.MakeSureDirectoryPathExists - MapDebugInformation = dbghelp.MapDebugInformation - MiniDumpReadDumpStream = dbghelp.MiniDumpReadDumpStream - MiniDumpWriteDump = dbghelp.MiniDumpWriteDump - SearchTreeForFile = dbghelp.SearchTreeForFile - SearchTreeForFileW = dbghelp.SearchTreeForFileW - StackWalk = dbghelp.StackWalk - StackWalk64 = dbghelp.StackWalk64 - SymAddSymbol = dbghelp.SymAddSymbol - SymAddSymbolW = dbghelp.SymAddSymbolW - SymEnumLines = dbghelp.SymEnumLines - SymEnumSourceFiles = dbghelp.SymEnumSourceFiles - SymEnumSymbols = dbghelp.SymEnumSymbols - SymEnumSymbolsW = dbghelp.SymEnumSymbolsW - SymEnumTypes = dbghelp.SymEnumTypes - SymEnumTypesW = dbghelp.SymEnumTypesW - SymEnumerateModules = dbghelp.SymEnumerateModules - SymEnumerateModules64 = dbghelp.SymEnumerateModules64 - SymEnumerateModulesW64 = dbghelp.SymEnumerateModulesW64 - SymEnumerateSymbols = dbghelp.SymEnumerateSymbols - SymEnumerateSymbols64 = dbghelp.SymEnumerateSymbols64 - SymFindFileInPath = dbghelp.SymFindFileInPath - SymFindFileInPathW = dbghelp.SymFindFileInPathW - SymFromName = dbghelp.SymFromName - SymFunctionTableAccess = dbghelp.SymFunctionTableAccess - SymFunctionTableAccess64 = dbghelp.SymFunctionTableAccess64 - SymGetLineFromAddr = dbghelp.SymGetLineFromAddr - SymGetLineNext = dbghelp.SymGetLineNext - SymGetLineNext64 = dbghelp.SymGetLineNext64 - SymGetLinePrev = dbghelp.SymGetLinePrev - SymGetLinePrev64 = dbghelp.SymGetLinePrev64 - SymGetModuleBase = dbghelp.SymGetModuleBase - SymGetModuleBase64 = dbghelp.SymGetModuleBase64 - SymGetModuleInfo = dbghelp.SymGetModuleInfo - SymGetModuleInfo64 = dbghelp.SymGetModuleInfo64 - SymGetModuleInfoW = dbghelp.SymGetModuleInfoW - SymGetModuleInfoW64 = dbghelp.SymGetModuleInfoW64 - SymGetOptions = dbghelp.SymGetOptions - SymGetSearchPath = dbghelp.SymGetSearchPath - SymGetSearchPathW = dbghelp.SymGetSearchPathW - SymGetSourceFileToken = dbghelp.SymGetSourceFileToken - SymGetSourceFileTokenW = dbghelp.SymGetSourceFileTokenW - SymGetSymFromAddr = dbghelp.SymGetSymFromAddr - SymGetSymFromAddr64 = dbghelp.SymGetSymFromAddr64 - SymGetSymFromName = dbghelp.SymGetSymFromName - SymGetSymFromName64 = dbghelp.SymGetSymFromName64 - SymGetSymNext = dbghelp.SymGetSymNext - SymGetSymNext64 = dbghelp.SymGetSymNext64 - SymGetSymPrev = dbghelp.SymGetSymPrev - SymGetSymPrev64 = dbghelp.SymGetSymPrev64 - SymGetTypeFromName = dbghelp.SymGetTypeFromName - SymGetTypeInfo = dbghelp.SymGetTypeInfo - SymLoadModule = dbghelp.SymLoadModule - SymLoadModule64 = dbghelp.SymLoadModule64 - SymMatchFileName = dbghelp.SymMatchFileName - SymMatchFileNameW = dbghelp.SymMatchFileNameW - SymMatchString = dbghelp.SymMatchString - SymRefreshModuleList = dbghelp.SymRefreshModuleList - SymRegisterCallback = dbghelp.SymRegisterCallback - SymRegisterCallback64 = dbghelp.SymRegisterCallback64 - SymRegisterCallbackW64 = dbghelp.SymRegisterCallbackW64 - SymRegisterFunctionEntryCallback = dbghelp.SymRegisterFunctionEntryCallback - SymRegisterFunctionEntryCallback64 = dbghelp.SymRegisterFunctionEntryCallback64 - SymSearch = dbghelp.SymSearch - SymSearchW = dbghelp.SymSearchW - SymSetContext = dbghelp.SymSetContext - SymSetParentWindow = dbghelp.SymSetParentWindow - SymSetScopeFromAddr = dbghelp.SymSetScopeFromAddr - SymSetSearchPath = dbghelp.SymSetSearchPath - SymSetSearchPathW = dbghelp.SymSetSearchPathW - SymUnDName = dbghelp.SymUnDName - SymUnDName64 = dbghelp.SymUnDName64 - SymUnloadModule = dbghelp.SymUnloadModule - SymUnloadModule64 = dbghelp.SymUnloadModule64 - UnmapDebugInformation = dbghelp.UnmapDebugInformation - WinDbgExtensionDllInit = dbghelp.WinDbgExtensionDllInit + EnumDirTree@24 == EnumDirTree + EnumDirTreeW@24 == EnumDirTreeW + EnumerateLoadedModules@12 == EnumerateLoadedModules + EnumerateLoadedModules64@12 == EnumerateLoadedModules64 + EnumerateLoadedModulesW64@12 == EnumerateLoadedModulesW64 + ExtensionApiVersion@0 == ExtensionApiVersion + FindDebugInfoFile@12 == FindDebugInfoFile + FindDebugInfoFileEx@20 == FindDebugInfoFileEx + FindExecutableImage@12 == FindExecutableImage + FindExecutableImageEx@20 == FindExecutableImageEx + FindExecutableImageExW@20 == FindExecutableImageExW + GetTimestampForLoadedLibrary@4 == GetTimestampForLoadedLibrary + ImageDirectoryEntryToData@16 == ImageDirectoryEntryToData + ImageDirectoryEntryToDataEx@20 == ImageDirectoryEntryToDataEx + ImageNtHeader@4 == ImageNtHeader + ImageRvaToSection@12 == ImageRvaToSection + ImageRvaToVa@16 == ImageRvaToVa + ImagehlpApiVersion@0 == ImagehlpApiVersion + ImagehlpApiVersionEx@4 == ImagehlpApiVersionEx + MakeSureDirectoryPathExists@4 == MakeSureDirectoryPathExists + MapDebugInformation@16 == MapDebugInformation + MiniDumpReadDumpStream@20 == MiniDumpReadDumpStream + MiniDumpWriteDump@28 == MiniDumpWriteDump + SearchTreeForFile@12 == SearchTreeForFile + SearchTreeForFileW@12 == SearchTreeForFileW + StackWalk@36 == StackWalk + StackWalk64@36 == StackWalk64 + SymAddSymbol@32 == SymAddSymbol + SymAddSymbolW@32 == SymAddSymbolW + SymEnumLines@28 == SymEnumLines + SymEnumSourceFiles@24 == SymEnumSourceFiles + SymEnumSymbols@24 == SymEnumSymbols + SymEnumSymbolsW@24 == SymEnumSymbolsW + SymEnumTypes@20 == SymEnumTypes + SymEnumTypesW@20 == SymEnumTypesW + SymEnumerateModules@12 == SymEnumerateModules + SymEnumerateModules64@12 == SymEnumerateModules64 + SymEnumerateModulesW64@12 == SymEnumerateModulesW64 + SymEnumerateSymbols@16 == SymEnumerateSymbols + SymEnumerateSymbols64@20 == SymEnumerateSymbols64 + SymFindFileInPath@40 == SymFindFileInPath + SymFindFileInPathW@40 == SymFindFileInPathW + SymFromName@12 == SymFromName + SymFunctionTableAccess@8 == SymFunctionTableAccess + SymFunctionTableAccess64@12 == SymFunctionTableAccess64 + SymGetLineFromAddr@16 == SymGetLineFromAddr + SymGetLineNext@8 == SymGetLineNext + SymGetLineNext64@8 == SymGetLineNext64 + SymGetLinePrev@8 == SymGetLinePrev + SymGetLinePrev64@8 == SymGetLinePrev64 + SymGetModuleBase@8 == SymGetModuleBase + SymGetModuleBase64@12 == SymGetModuleBase64 + SymGetModuleInfo@12 == SymGetModuleInfo + SymGetModuleInfo64@16 == SymGetModuleInfo64 + SymGetModuleInfoW@12 == SymGetModuleInfoW + SymGetModuleInfoW64@16 == SymGetModuleInfoW64 + SymGetOptions@0 == SymGetOptions + SymGetSearchPath@12 == SymGetSearchPath + SymGetSearchPathW@12 == SymGetSearchPathW + SymGetSourceFileToken@24 == SymGetSourceFileToken + SymGetSourceFileTokenW@24 == SymGetSourceFileTokenW + SymGetSymFromAddr@16 == SymGetSymFromAddr + SymGetSymFromAddr64@20 == SymGetSymFromAddr64 + SymGetSymFromName@12 == SymGetSymFromName + SymGetSymFromName64@12 == SymGetSymFromName64 + SymGetSymNext@8 == SymGetSymNext + SymGetSymNext64@8 == SymGetSymNext64 + SymGetSymPrev@8 == SymGetSymPrev + SymGetSymPrev64@8 == SymGetSymPrev64 + SymGetTypeFromName@20 == SymGetTypeFromName + SymGetTypeInfo@24 == SymGetTypeInfo + SymLoadModule@24 == SymLoadModule + SymLoadModule64@28 == SymLoadModule64 + SymMatchFileName@16 == SymMatchFileName + SymMatchFileNameW@16 == SymMatchFileNameW + SymMatchString@12 == SymMatchString + SymRefreshModuleList@4 == SymRefreshModuleList + SymRegisterCallback@12 == SymRegisterCallback + SymRegisterCallback64@16 == SymRegisterCallback64 + SymRegisterCallbackW64@16 == SymRegisterCallbackW64 + SymRegisterFunctionEntryCallback@12 == SymRegisterFunctionEntryCallback + SymRegisterFunctionEntryCallback64@16 == SymRegisterFunctionEntryCallback64 + SymSearch@44 == SymSearch + SymSearchW@44 == SymSearchW + SymSetContext@12 == SymSetContext + SymSetParentWindow@4 == SymSetParentWindow + SymSetScopeFromAddr@12 == SymSetScopeFromAddr + SymSetSearchPath@8 == SymSetSearchPath + SymSetSearchPathW@8 == SymSetSearchPathW + SymUnDName@12 == SymUnDName + SymUnDName64@12 == SymUnDName64 + SymUnloadModule@8 == SymUnloadModule + SymUnloadModule64@12 == SymUnloadModule64 + UnmapDebugInformation@4 == UnmapDebugInformation + WinDbgExtensionDllInit@12 == WinDbgExtensionDllInit \ No newline at end of file From add3815c8bc39c975025089d6694a432fcbec426 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 9 Dec 2023 19:31:20 +0100 Subject: [PATCH 6/6] Revert "ci: Temporary workaround for build race condition." This reverts commit f9c837ede6987b4c14798606c4c8e6a7e24a3f9d. --- ci/build.ps1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index 3945563..7a0a6b6 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -119,10 +119,6 @@ Exec { cmake "-S." "-B$buildDir" -G $generator "-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_ # # Build # -if ($target -eq "mingw32") { -# XXX: Temporary hack to avoid "No rule to make target lib*.dll.a" - Exec { cmake --build $buildDir --use-stderr --target libmgwhelp_implib --target libexchndl_implib } -} Exec { cmake --build $buildDir --use-stderr --target all } Exec { python tests\check_dynamic_linkage.py --objdump=objdump --validate $buildDir\bin\*.dll $buildDir\bin\*.exe }