[PATCH] D100442: [flang][msvc] Fix compilation of RuntimeGtest tests.
مهدي شينون (Mehdi Chinoune) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 13 21:40:18 PDT 2021
MehdiChinoune created this revision.
MehdiChinoune added reviewers: Flang, Meinersbur, awarzynski.
MehdiChinoune added a project: Flang.
Herald added subscribers: jdoerfert, mgorny.
MehdiChinoune requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100442
Files:
flang/unittests/RuntimeGTest/CMakeLists.txt
flang/unittests/RuntimeGTest/CrashHandlerFixture.cpp
Index: flang/unittests/RuntimeGTest/CrashHandlerFixture.cpp
===================================================================
--- flang/unittests/RuntimeGTest/CrashHandlerFixture.cpp
+++ flang/unittests/RuntimeGTest/CrashHandlerFixture.cpp
@@ -28,7 +28,7 @@
// Register the crash handler above when creating each unit test in this suite
void CrashHandlerFixture::SetUp() {
static bool isCrashHanlderRegistered{false};
- if (not isCrashHanlderRegistered)
+ if (!isCrashHanlderRegistered)
Fortran::runtime::Terminator::RegisterCrashHandler(CatchCrash);
isCrashHanlderRegistered = true;
}
Index: flang/unittests/RuntimeGTest/CMakeLists.txt
===================================================================
--- flang/unittests/RuntimeGTest/CMakeLists.txt
+++ flang/unittests/RuntimeGTest/CMakeLists.txt
@@ -9,7 +9,14 @@
RuntimeCrashTest.cpp
)
+if (LLVM_LINK_LLVM_DYLIB)
+ set(llvm_libs LLVM)
+else()
+ llvm_map_components_to_libnames(llvm_libs Support)
+endif()
+
target_link_libraries(FlangRuntimeTests
PRIVATE
FortranRuntime
+ ${llvm_libs}
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100442.337328.patch
Type: text/x-patch
Size: 1077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210414/1f90f786/attachment.bin>
More information about the llvm-commits
mailing list