-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cmake] Drop AddFileDependencies
and CMakeParseArguments
#120002
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Theses modules are deprecated and have trivial implementations in modern cmake.
llvmbot
added
cmake
Build system in general and CMake in particular
clang
Clang issues not falling into any other category
compiler-rt
libc
flang
Flang issues not falling into any other category
labels
Dec 15, 2024
@llvm/pr-subscribers-libc @llvm/pr-subscribers-clang Author: None (paperchalice) ChangesTheses modules are deprecated and have trivial implementations in modern cmake. Full diff: https://github.com/llvm/llvm-project/pull/120002.diff 8 Files Affected:
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 27e8095534a65c..b79e570667b2c4 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -362,7 +362,6 @@ if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*")
message(STATUS "Host linker version: ${HOST_LINK_VERSION}")
endif()
-include(CMakeParseArguments)
include(AddClang)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
index d8a491dbbd732a..53aa750d934d72 100644
--- a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
@@ -1,4 +1,3 @@
-include(CMakeParseArguments)
include(CompilerRTUtils)
function(get_aix_libatomic_default_link_flags link_flags export_list)
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 74a5d4edcd859f..fa8c6be6c5d462 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -1,4 +1,3 @@
-include(CMakeParseArguments)
include(CompilerRTUtils)
include(BuiltinTests)
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index 971e5d5c93f231..e1e40bd70390a6 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -117,7 +117,6 @@ if (FLANG_STANDALONE_BUILD)
set(USE_NO_MAYBE_UNINITIALIZED 1)
endif()
- include(CMakeParseArguments)
include(AddLLVM)
include(HandleLLVMOptions)
include(VersionFromVCS)
@@ -445,7 +444,6 @@ if (APPLE)
endif()
endif()
-include(CMakeParseArguments)
include(AddFlang)
if (FLANG_INCLUDE_TESTS)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 88cc75e83b043d..00a07ea3c8ac75 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -329,7 +329,6 @@ endif()
option(LIBC_INCLUDE_DOCS "Build the libc documentation." ${LLVM_INCLUDE_DOCS})
-include(CMakeParseArguments)
include(LLVMLibCCheckCpuFeatures)
include(CheckCompilerFeatures)
include(LLVMLibCRules)
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index 205089bd2704cb..0670d60bf2afd7 100644
--- a/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -1,6 +1,3 @@
-include(AddFileDependencies)
-include(CMakeParseArguments)
-
function(llvm_replace_compiler_option var old new)
# Replaces a compiler option or switch `old' in `var' by `new'.
# If `old' is not in `var', appends `new' to `var'.
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt
index e02bda1ead50c0..02c2532dba77a7 100644
--- a/llvm/tools/llvm-config/CMakeLists.txt
+++ b/llvm/tools/llvm-config/CMakeLists.txt
@@ -89,7 +89,9 @@ if(LLVM_ENABLE_MODULES)
endif()
# Add the dependency on the generation step.
-add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
+set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp
+ APPEND PROPERTY OBJECT_DEPENDS ${BUILDVARIABLES_OBJPATH}
+)
if(CMAKE_CROSSCOMPILING)
if (LLVM_NATIVE_TOOL_DIR AND NOT LLVM_CONFIG_PATH)
diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
index a791be4fa5bc87..ddd6376273376a 100644
--- a/polly/cmake/polly_macros.cmake
+++ b/polly/cmake/polly_macros.cmake
@@ -1,6 +1,3 @@
-
-include(CMakeParseArguments)
-
macro(add_polly_library name)
cmake_parse_arguments(ARG "" "" "" ${ARGN})
set(srcs ${ARG_UNPARSED_ARGUMENTS})
|
lntue
approved these changes
Dec 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the libc changes.
raikonenfnu
added a commit
to raikonenfnu/iree
that referenced
this pull request
Dec 17, 2024
Update LLVM to llvm/llvm-project@b07e7b76c5d532a6 (llvm/llvm-project#120002) Carrying the following reverts - llvm/llvm-project#116470 - llvm/llvm-project#117424 - llvm/llvm-project#119671 - llvm/llvm-project#119970 First two are carry over from previous-previous integrate. It is being fixed in iree-org#19451 . The last one is a from the previous integrate. The last one is a new error being tracked in iree-org#19498 Signed-off-by: Stanley Winata <stanley.winata@amd.com>
raikonenfnu
added a commit
to raikonenfnu/iree
that referenced
this pull request
Dec 17, 2024
Update LLVM to llvm/llvm-project@b07e7b76c5d532a6 (llvm/llvm-project#120002) Carrying the following reverts - llvm/llvm-project#116470 - llvm/llvm-project#117424 - llvm/llvm-project#119671 - llvm/llvm-project#119970 First two are carry over from previous-previous integrate. It is being fixed in iree-org#19451 . The last one is a from the previous integrate. The last one is a new error being tracked in iree-org#19498 Signed-off-by: Stanley Winata <stanley.winata@amd.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang
Clang issues not falling into any other category
cmake
Build system in general and CMake in particular
compiler-rt
flang
Flang issues not falling into any other category
libc
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Theses modules are deprecated and have trivial implementations in modern cmake.