]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only permit use of ld.lld linker when the Clang compiler is used. 7815/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 15 Mar 2019 09:05:20 +0000 (10:05 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 15 Mar 2019 09:05:20 +0000 (10:05 +0100)
Fixes #7811

cmake/checks/check_02_compiler_features.cmake

index d108cc47672f3a934d20b9157f0b2711551fe974..fae50833f9e47ff05b227b037ccce5ff05c8681d 100644 (file)
@@ -460,7 +460,11 @@ CHECK_CXX_SOURCE_COMPILES(
   DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
 RESET_CMAKE_REQUIRED()
 
-IF(DEAL_II_COMPILER_HAS_FUSE_LD_LLD)
+#
+# The ld.lld linker is not compatible with GCC. So we only enable it when
+# the Clang compiler is used. See https://github.com/dealii/dealii/issues/7811
+#
+IF(DEAL_II_COMPILER_HAS_FUSE_LD_LLD AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=lld")
 ELSEIF(DEAL_II_COMPILER_HAS_FUSE_LD_GOLD)
   ADD_FLAGS(DEAL_II_LINKER_FLAGS "-fuse-ld=gold")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.