diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index acd4c1b6b1..8bdbcb823f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -255,7 +255,7 @@ target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unord target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd) # Please refer to src/common/demangle.cpp -if (MSVC) +if (WIN32) target_link_libraries(common PRIVATE LLVM::Demangle) endif() diff --git a/src/common/demangle.cpp b/src/common/demangle.cpp index 87a3834180..8f76a884a8 100644 --- a/src/common/demangle.cpp +++ b/src/common/demangle.cpp @@ -6,7 +6,7 @@ #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #include #else #include @@ -23,7 +23,7 @@ namespace Common { std::string DemangleSymbol(const std::string& mangled) { if (mangled.size() > 0) { if (IsItanium(mangled)) { -#ifdef _MSC_VER +#ifdef _WIN32 // requires the use of llvm if (char* p = llvm::itaniumDemangle(mangled); p != nullptr) { std::string ret = std::string{p};