File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,11 @@ if (LIBCXX_ENABLE_SHARED)
254254 list (APPEND LIBCXX_BUILD_TARGETS "cxx_shared" )
255255endif ()
256256
257+ if (WIN32 AND NOT (${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} STREQUAL "MSVC" ))
258+ string (APPEND link_libraries " ${CMAKE_LINK_LIBRARY_FLAG} dbghelp" )
259+ string (APPEND link_libraries " ${CMAKE_LINK_LIBRARY_FLAG} psapi" )
260+ endif ()
261+
257262if (WIN32 AND NOT MINGW AND NOT "${CMAKE_HOST_SYSTEM_NAME} " STREQUAL "Windows" )
258263 # Since we most likely do not have a mt.exe replacement, disable the
259264 # manifest bundling. This allows a normal cmake invocation to pass which
Original file line number Diff line number Diff line change 1010
1111# define WIN32_LEAN_AND_MEAN
1212# include < windows.h>
13- //
14- # include < dbghelp.h>
15- # include < psapi.h>
16- //
13+
1714# include < cstring>
15+ # include < dbghelp.h>
1816# include < mutex>
17+ # include < psapi.h>
1918# include < stacktrace>
2019
21- # pragma comment(lib, "dbghelp.lib")
22- # pragma comment(lib, "psapi.lib")
20+ # if defined(_MSC_VER)
21+ # pragma comment(lib, "dbghelp.lib")
22+ # pragma comment(lib, "psapi.lib")
23+ # endif
2324
2425_LIBCPP_BEGIN_NAMESPACE_STD
2526namespace __stacktrace {
You can’t perform that action at this time.
0 commit comments