Skip to content

Commit c3aed0d

Browse files
committed
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
1 parent 320832c commit c3aed0d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlir/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
3737

3838
include(AddMLIR)
3939

40+
# -BSymbolic is incompatible with TypeID
41+
if("${CMAKE_SHARED_LINKER_FLAGS}" MATCHES "-Bsymbolic[^-]")
42+
message(FATAL_ERROR " MLIR does not support `-Bsymbolic` (see http://llvm.org/pr51420 ),"
43+
" try `-Bsymbolic-functions` instead.")
44+
endif()
45+
4046
# Forbid implicit function declaration: this may lead to subtle bugs and we
4147
# don't have a reason to support this.
4248
check_c_compiler_flag("-Werror=implicit-function-declaration" C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION)

0 commit comments

Comments
 (0)