[llvm] e72cba9 - Use configure depends to trigger reconfiguration when LLVMBuild files change

David Chisnall via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 08:31:17 PDT 2020


Author: Daniel Frampton
Date: 2020-05-26T16:30:20+01:00
New Revision: e72cba975735c2202b254621d79fb9dbbed08d39

URL: https://github.com/llvm/llvm-project/commit/e72cba975735c2202b254621d79fb9dbbed08d39
DIFF: https://github.com/llvm/llvm-project/commit/e72cba975735c2202b254621d79fb9dbbed08d39.diff

LOG: Use configure depends to trigger reconfiguration when LLVMBuild files change

Summary:
The existing logic has a workaround where configure_file is used to write a single dummy file output many times.

CMake has a feature to more directly add the dependency and avoid the dummy file (it is available in the minimum version specified).

Reviewers: theraven

Reviewed By: theraven

Subscribers: theraven, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80218

Added: 
    

Modified: 
    llvm/utils/llvm-build/llvmbuild/main.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/llvm-build/llvmbuild/main.py b/llvm/utils/llvm-build/llvmbuild/main.py
index 99b82ad5e20c..4f64c52608f9 100644
--- a/llvm/utils/llvm-build/llvmbuild/main.py
+++ b/llvm/utils/llvm-build/llvmbuild/main.py
@@ -563,19 +563,10 @@ def write_cmake_fragment(self, output_path, enabled_optional_components):
         f.write("""
 # LLVMBuild CMake fragment dependencies.
 #
-# CMake has no builtin way to declare that the configuration depends on
-# a particular file. However, a side effect of configure_file is to add
-# said input file to CMake's internal dependency list. So, we use that
-# and a dummy output file to communicate the dependency information to
-# CMake.
-#
-# FIXME: File a CMake RFE to get a properly supported version of this
-# feature.
 """)
         for dep in dependencies:
             f.write("""\
-configure_file(\"%s\"
-               ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)\n""" % (
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS \"%s\")\n""" % (
                 cmake_quote_path(dep),))
 
         # Write the properties we use to encode the required library dependency


        


More information about the llvm-commits mailing list