[llvm-branch-commits] [mlir] d5159b9 - MLIR can't support -Bsymbolic link option, fail at CMake time with a helpful message instead of broken runtime

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 8 09:08:31 PST 2021


Author: Mehdi Amini
Date: 2021-11-08T09:08:09-08:00
New Revision: d5159b99105d2019ae0930ed09dae2eed0fede81

URL: https://github.com/llvm/llvm-project/commit/d5159b99105d2019ae0930ed09dae2eed0fede81
DIFF: https://github.com/llvm/llvm-project/commit/d5159b99105d2019ae0930ed09dae2eed0fede81.diff

LOG: MLIR can't support -Bsymbolic link option, fail at CMake time with a helpful message instead of broken runtime

Differential Revision: https://reviews.llvm.org/D110483

(cherry picked from commit c3aed0d395950c23d66c3ec0af4b1a2ec2534795)

Added: 
    

Modified: 
    mlir/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index 54ea572ae5f3..b7ac3bdc543f 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -37,6 +37,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
 include(AddMLIR)
 
+# -BSymbolic is incompatible with TypeID
+if("${CMAKE_SHARED_LINKER_FLAGS}" MATCHES "-Bsymbolic[^-]")
+  message(FATAL_ERROR " MLIR does not support `-Bsymbolic` (see http://llvm.org/pr51420 ),"
+          " try `-Bsymbolic-functions` instead.")
+endif()
+
 # Forbid implicit function declaration: this may lead to subtle bugs and we
 # don't have a reason to support this.
 check_c_compiler_flag("-Werror=implicit-function-declaration" C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION)


        


More information about the llvm-branch-commits mailing list