forked from OSchip/llvm-project
[flang] Remove build dependency on clang
For now all we need to depend on is LLVM. Use llvm_map_components_to_libnames to find libraries to link against. Original-commit: flang-compiler/f18@dff1402c2a Reviewed-on: https://github.com/flang-compiler/f18/pull/321
This commit is contained in:
parent
4105558efe
commit
f8995fcefa
|
@ -48,11 +48,8 @@ endif()
|
|||
|
||||
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}" )
|
||||
|
||||
find_package(Clang REQUIRED CONFIG)
|
||||
include_directories(${CLANG_INSTALL_PREFIX/include})
|
||||
message(STATUS "Found Clang in ${CLANG_INSTALL_PREFIX}")
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in ${LLVM_INSTALL_PREFIX}")
|
||||
|
||||
# Get names for the LLVM libraries
|
||||
#
|
||||
|
@ -73,7 +70,8 @@ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
|||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
llvm_map_components_to_libnames(LLVM_COMMON_LIBS support target option)
|
||||
llvm_map_components_to_libnames(LLVM_COMMON_LIBS support)
|
||||
message(STATUS "LLVM libraries: ${LLVM_COMMON_LIBS}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
|
|
@ -33,5 +33,4 @@ add_library(FortranSemantics
|
|||
target_link_libraries(FortranSemantics
|
||||
FortranCommon
|
||||
FortranEvaluate
|
||||
clangBasic
|
||||
)
|
||||
|
|
|
@ -21,4 +21,5 @@ target_link_libraries(f18
|
|||
FortranParser
|
||||
FortranEvaluate
|
||||
FortranSemantics
|
||||
${LLVM_COMMON_LIBS}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue