CMake build: force-link SDBM lib into SDBM unit tests
authorAlex Zinenko <zinenko@google.com>
Tue, 21 May 2019 15:56:38 +0000 (08:56 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 02:54:53 +0000 (19:54 -0700)
    Otherwise, GCC < 7 does not link in the dialect registration, fails to look up
    the dialect in the context and cannot construct SDBM objects.

--

PiperOrigin-RevId: 249259758

mlir/unittests/SDBM/CMakeLists.txt

index d86f9dd..3d832ec 100644 (file)
@@ -5,3 +5,4 @@ target_link_libraries(MLIRSDBMTests
   PRIVATE
   MLIRSDBM
 )
+whole_archive_link(MLIRSDBMTests MLIRSDBM)