2020-09-11 17:17:31 +08:00
|
|
|
# Infrastructure to build flang driver entry point. Flang driver depends on
|
|
|
|
# LLVM libraries.
|
|
|
|
|
|
|
|
# Set your project compile flags.
|
|
|
|
link_directories(${LLVM_LIBRARY_DIR})
|
|
|
|
|
2020-10-15 00:40:29 +08:00
|
|
|
set( LLVM_LINK_COMPONENTS
|
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
|
|
Option
|
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2020-09-11 17:17:31 +08:00
|
|
|
add_flang_tool(flang-new
|
|
|
|
driver.cpp
|
|
|
|
fc1_main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(flang-new
|
|
|
|
PRIVATE
|
|
|
|
flangFrontend
|
|
|
|
flangFrontendTool
|
2020-10-15 00:40:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
clang_target_link_libraries(flang-new
|
|
|
|
PRIVATE
|
2020-09-11 17:17:31 +08:00
|
|
|
clangDriver
|
|
|
|
clangBasic
|
|
|
|
)
|
|
|
|
|
2021-08-12 18:42:08 +08:00
|
|
|
option(FLANG_PLUGIN_SUPPORT "Build Flang with plugin support." ON)
|
|
|
|
|
|
|
|
# Enable support for plugins, which need access to symbols from flang-new
|
|
|
|
if(FLANG_PLUGIN_SUPPORT)
|
|
|
|
export_executable_symbols_for_plugins(flang-new)
|
|
|
|
endif()
|
|
|
|
|
2021-04-05 01:02:18 +08:00
|
|
|
install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}")
|