[PATCH] D107973: [flang] Disable Plugins in out-of-tree builds
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 12:30:24 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8150c1bd8e26: [flang] Disable Plugins in out-of-tree builds (authored by awarzynski).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107973/new/
https://reviews.llvm.org/D107973
Files:
flang/CMakeLists.txt
flang/test/CMakeLists.txt
Index: flang/test/CMakeLists.txt
===================================================================
--- flang/test/CMakeLists.txt
+++ flang/test/CMakeLists.txt
@@ -9,13 +9,23 @@
set(FLANG_TOOLS_DIR ${FLANG_BINARY_DIR}/bin)
+# FIXME In out-of-tree builds, "SHLIBDIR" is undefined and passing it to
+# `configure_lit_site_cfg` leads to a configuration error. This is currently
+# only required by plugins/examples, which are not supported in out-of-tree
+# builds.
+if (FLANG_STANDALONE_BUILD)
+ set(PATHS_FOR_PLUGINS "")
+else ()
+ set(PATHS_FOR_PLUGINS "SHLIBDIR")
+endif ()
+
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
MAIN_CONFIG
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
PATHS
- "SHLIBDIR"
+ ${PATHS_FOR_PLUGINS}
)
configure_lit_site_cfg(
Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -392,6 +392,9 @@
add_subdirectory(runtime)
option(FLANG_BUILD_EXAMPLES "Build Flang example programs by default." OFF)
+if (FLANG_BUILD_EXAMPLES AND FLANG_STANDALONE_BUILD)
+ message(FATAL_ERROR "Examples are not supported in out-of-tree builds.")
+endif()
add_subdirectory(examples)
if (FLANG_INCLUDE_TESTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107973.366074.patch
Type: text/x-patch
Size: 1308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210812/0b241597/attachment.bin>
More information about the llvm-commits
mailing list