-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Update CMake dependency for generate_iwyu_mapping.py #115387
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
[libc++] Update CMake dependency for generate_iwyu_mapping.py #115387
Conversation
Created using spr 1.3.6-beta.1
@llvm/pr-subscribers-libcxx Author: Alexander Richardson (arichardson) ChangesThis script does not depend on the generated headers since those are Full diff: https://github.com/llvm/llvm-project/pull/115387.diff 3 Files Affected:
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index ae2e8bcb32aaa4..ebd6eda9ba30f8 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -1059,7 +1059,7 @@ endforeach()
# "include" for dependency tracking.
add_custom_command(OUTPUT "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp"
COMMAND "${Python3_EXECUTABLE}" "${LIBCXX_SOURCE_DIR}/utils/generate_iwyu_mapping.py" "-o" "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp"
- DEPENDS ${_all_includes}
+ DEPENDS "${LIBCXX_SOURCE_DIR}/utils/libcxx/header_information.py"
COMMENT "Generate the mapping file for include-what-you-use"
)
list(APPEND _all_includes "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp")
diff --git a/libcxx/include/__cxx03/CMakeLists.txt b/libcxx/include/__cxx03/CMakeLists.txt
index 32579272858a8e..b61442da89d4bf 100644
--- a/libcxx/include/__cxx03/CMakeLists.txt
+++ b/libcxx/include/__cxx03/CMakeLists.txt
@@ -1037,7 +1037,7 @@ endforeach()
# "include" for dependency tracking.
add_custom_command(OUTPUT "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp"
COMMAND "${Python3_EXECUTABLE}" "${LIBCXX_SOURCE_DIR}/utils/generate_iwyu_mapping.py" "-o" "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp"
- DEPENDS ${_all_includes}
+ DEPENDS "${LIBCXX_SOURCE_DIR}/utils/libcxx/header_information.py"
COMMENT "Generate the mapping file for include-what-you-use"
)
list(APPEND _all_includes "${LIBCXX_GENERATED_INCLUDE_DIR}/libcxx.imp")
diff --git a/libcxx/utils/libcxx/header_information.py b/libcxx/utils/libcxx/header_information.py
index 7d88b73d0331bb..9a723b61524cd5 100644
--- a/libcxx/utils/libcxx/header_information.py
+++ b/libcxx/utils/libcxx/header_information.py
@@ -6,9 +6,9 @@
#
# ===----------------------------------------------------------------------===##
-import os, pathlib, functools
+import pathlib, functools
-libcxx_root = pathlib.Path(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
+libcxx_root = pathlib.Path(__file__).resolve().parent.parent.parent
libcxx_include = libcxx_root / "include"
assert libcxx_root.exists()
|
This is preparation for #115380 |
Ci looks like a flaky failure |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/3641 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/3484 Here is the relevant piece of the build log for the reference
|
…15387) This script does not depend on the generated headers since those are already special-cased in header_information.py. Change the dependency list to depend on header_information.py instead. While looking at this code also simplify the assignment to libcxx_root inside this script.
This script does not depend on the generated headers since those are
already special-cased in header_information.py. Change the dependency
list to depend on header_information.py instead. While looking at this
code also simplify the assignment to libcxx_root inside this script.