mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 02:26:05 +00:00

Without this change the problem is that flangOmpReport and flangPrintFunctionNames libraries are not built under 'all', but they are imported targets via LLVMExports.cmake so that any out-of-tree build that configures upon LLVM+Flang package will get this CMake error: ``` The imported target "flangPrintFunctionNames" references the file ".../lib/flangPrintFunctionNames.so" but this file does not exist. ``` flang-aarch64-out-of-tree buildbot (https://lab.llvm.org/buildbot/#/builders/175) does not catch this issue, because it does not enable Flang on the first stage. This change gets rid of FLANG_BUILD_EXAMPLES in favor of LLVM_BUILD_EXAMPLES and uses available LLVM CMake macros to add example executables/libraries. Differential Revision: https://reviews.llvm.org/D145992
32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
import sys
|
|
|
|
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
|
|
config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
|
|
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
|
|
config.target_triple = "@LLVM_TARGET_TRIPLE@"
|
|
config.llvm_target_triple_env = "@LLVM_TARGET_TRIPLE_ENV@"
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
|
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
|
|
config.flang_obj_root = "@FLANG_BINARY_DIR@"
|
|
config.flang_src_dir = "@FLANG_SOURCE_DIR@"
|
|
config.flang_tools_dir = lit_config.substitute("@FLANG_TOOLS_DIR@")
|
|
config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"
|
|
config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
|
|
config.flang_lib_dir = "@CMAKE_BINARY_DIR@/lib"
|
|
config.flang_test_triple = "@FLANG_TEST_TARGET_TRIPLE@"
|
|
config.flang_examples = @LLVM_BUILD_EXAMPLES@
|
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
|
config.flang_standalone_build = @FLANG_STANDALONE_BUILD@
|
|
config.has_plugins = @LLVM_ENABLE_PLUGINS@
|
|
config.linked_bye_extension = @LLVM_BYE_LINK_INTO_TOOLS@
|
|
config.cc = "@CMAKE_C_COMPILER@"
|
|
config.targets_to_build = "@TARGETS_TO_BUILD@"
|
|
|
|
import lit.llvm
|
|
lit.llvm.initialize(lit_config, config)
|
|
|
|
# Let the main config do the real work.
|
|
lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/lit.cfg.py")
|