[Lldb-commits] [lldb] r355340 - [build] Rename clang-headers to clang-resource-headers
Shoaib Meenai via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 4 13:19:53 PST 2019
Author: smeenai
Date: Mon Mar 4 13:19:53 2019
New Revision: 355340
URL: http://llvm.org/viewvc/llvm-project?rev=355340&view=rev
Log:
[build] Rename clang-headers to clang-resource-headers
Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].
I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.
[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html
Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille
Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits
Tags: #clang, #sanitizers, #lldb, #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D58791
Added:
lldb/trunk/scripts/Xcode/package-clang-resource-headers.py
Removed:
lldb/trunk/scripts/Xcode/package-clang-headers.py
Modified:
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/CMakeLists.txt
Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=355340&r1=355339&r2=355340&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Mon Mar 4 13:19:53 2019
@@ -98,10 +98,10 @@ add_custom_command(TARGET lldb-framework
# Copy vendor-specific headers from clang (without staging).
if(NOT IOS AND NOT LLDB_BUILT_STANDALONE)
- add_dependencies(lldb-framework clang-headers)
+ add_dependencies(lldb-framework clang-resource-headers)
add_custom_command(TARGET lldb-framework POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
- $<TARGET_PROPERTY:clang-headers,RUNTIME_OUTPUT_DIRECTORY>
+ $<TARGET_PROPERTY:clang-resource-headers,RUNTIME_OUTPUT_DIRECTORY>
$<TARGET_FILE_DIR:liblldb>/Resources/Clang/include
COMMENT "LLDB.framework: copy clang vendor-specific headers"
)
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=355340&r1=355339&r2=355340&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Mar 4 13:19:53 2019
@@ -7618,7 +7618,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/usr/bin/python $SRCROOT/scripts/Xcode/package-clang-headers.py $TARGET_BUILD_DIR $LLVM_BUILD_DIR/x86_64\n";
+ shellScript = "/usr/bin/python $SRCROOT/scripts/Xcode/package-clang-resource-headers.py $TARGET_BUILD_DIR $LLVM_BUILD_DIR/x86_64\n";
};
4C3326CA18B2A2B800EB5DD7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Removed: lldb/trunk/scripts/Xcode/package-clang-headers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/package-clang-headers.py?rev=355339&view=auto
==============================================================================
--- lldb/trunk/scripts/Xcode/package-clang-headers.py (original)
+++ lldb/trunk/scripts/Xcode/package-clang-headers.py (removed)
@@ -1,85 +0,0 @@
-#! /usr/bin/env python
-
-# package-clang-headers.py
-#
-# The Clang module loader depends on built-in headers for the Clang compiler.
-# We grab these from the Clang build and move them into the LLDB module.
-
-# TARGET_DIR is where the lldb framework/shared library gets put.
-# LLVM_BUILD_DIR is where LLVM and Clang got built
-# LLVM_BUILD_DIR/lib/clang should exist and contain headers
-
-import os
-import re
-import shutil
-import sys
-
-import lldbbuild
-
-if len(sys.argv) != 3:
- print "usage: " + sys.argv[0] + " TARGET_DIR LLVM_BUILD_DIR"
- sys.exit(1)
-
-target_dir = sys.argv[1]
-llvm_build_dir = lldbbuild.expected_package_build_path_for("llvm")
-
-if not os.path.isdir(target_dir):
- print target_dir + " doesn't exist"
- sys.exit(1)
-
-if not os.path.isdir(llvm_build_dir):
- llvm_build_dir = re.sub("-macosx-", "-iphoneos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
- llvm_build_dir = re.sub("-iphoneos-", "-appletvos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
- llvm_build_dir = re.sub("-appletvos-", "-watchos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
- llvm_build_dir = re.sub("-watchos-", "-bridgeos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
- print llvm_build_dir + " doesn't exist"
- sys.exit(1)
-
-resources = os.path.join(target_dir, "LLDB.framework", "Resources")
-
-if not os.path.isdir(resources):
- print resources + " must exist"
- sys.exit(1)
-
-clang_dir = os.path.join(llvm_build_dir, "lib", "clang")
-
-if not os.path.isdir(clang_dir):
- print clang_dir + " must exist"
- sys.exit(1)
-
-version_dir = None
-
-for subdir in os.listdir(clang_dir):
- if (re.match("^[0-9]+(\.[0-9]+)*$", subdir)):
- version_dir = os.path.join(clang_dir, subdir)
- break
-
-if version_dir is None:
- print "Couldn't find a subdirectory of the form #(.#)... in " + clang_dir
- sys.exit(1)
-
-if not os.path.isdir(version_dir):
- print version_dir + " is not a directory"
- sys.exit(1)
-
-# Just checking... we're actually going to copy all of version_dir
-include_dir = os.path.join(version_dir, "include")
-
-if not os.path.isdir(include_dir):
- print version_dir + " is not a directory"
- sys.exit(1)
-
-clang_resources = os.path.join(resources, "Clang")
-
-if os.path.isdir(clang_resources):
- shutil.rmtree(clang_resources)
-
-shutil.copytree(version_dir, clang_resources)
Added: lldb/trunk/scripts/Xcode/package-clang-resource-headers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/package-clang-resource-headers.py?rev=355340&view=auto
==============================================================================
--- lldb/trunk/scripts/Xcode/package-clang-resource-headers.py (added)
+++ lldb/trunk/scripts/Xcode/package-clang-resource-headers.py Mon Mar 4 13:19:53 2019
@@ -0,0 +1,85 @@
+#! /usr/bin/env python
+
+# package-clang-resource-headers.py
+#
+# The Clang module loader depends on built-in headers for the Clang compiler.
+# We grab these from the Clang build and move them into the LLDB module.
+
+# TARGET_DIR is where the lldb framework/shared library gets put.
+# LLVM_BUILD_DIR is where LLVM and Clang got built
+# LLVM_BUILD_DIR/lib/clang should exist and contain headers
+
+import os
+import re
+import shutil
+import sys
+
+import lldbbuild
+
+if len(sys.argv) != 3:
+ print "usage: " + sys.argv[0] + " TARGET_DIR LLVM_BUILD_DIR"
+ sys.exit(1)
+
+target_dir = sys.argv[1]
+llvm_build_dir = lldbbuild.expected_package_build_path_for("llvm")
+
+if not os.path.isdir(target_dir):
+ print target_dir + " doesn't exist"
+ sys.exit(1)
+
+if not os.path.isdir(llvm_build_dir):
+ llvm_build_dir = re.sub("-macosx-", "-iphoneos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
+ llvm_build_dir = re.sub("-iphoneos-", "-appletvos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
+ llvm_build_dir = re.sub("-appletvos-", "-watchos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
+ llvm_build_dir = re.sub("-watchos-", "-bridgeos-", llvm_build_dir)
+
+if not os.path.isdir(llvm_build_dir):
+ print llvm_build_dir + " doesn't exist"
+ sys.exit(1)
+
+resources = os.path.join(target_dir, "LLDB.framework", "Resources")
+
+if not os.path.isdir(resources):
+ print resources + " must exist"
+ sys.exit(1)
+
+clang_dir = os.path.join(llvm_build_dir, "lib", "clang")
+
+if not os.path.isdir(clang_dir):
+ print clang_dir + " must exist"
+ sys.exit(1)
+
+version_dir = None
+
+for subdir in os.listdir(clang_dir):
+ if (re.match("^[0-9]+(\.[0-9]+)*$", subdir)):
+ version_dir = os.path.join(clang_dir, subdir)
+ break
+
+if version_dir is None:
+ print "Couldn't find a subdirectory of the form #(.#)... in " + clang_dir
+ sys.exit(1)
+
+if not os.path.isdir(version_dir):
+ print version_dir + " is not a directory"
+ sys.exit(1)
+
+# Just checking... we're actually going to copy all of version_dir
+include_dir = os.path.join(version_dir, "include")
+
+if not os.path.isdir(include_dir):
+ print version_dir + " is not a directory"
+ sys.exit(1)
+
+clang_resources = os.path.join(resources, "Clang")
+
+if os.path.isdir(clang_resources):
+ shutil.rmtree(clang_resources)
+
+shutil.copytree(version_dir, clang_resources)
Modified: lldb/trunk/source/API/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=355340&r1=355339&r2=355340&view=diff
==============================================================================
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Mon Mar 4 13:19:53 2019
@@ -152,7 +152,7 @@ else()
endif()
if (NOT LLDB_BUILT_STANDALONE)
- add_dependencies(liblldb clang-headers)
+ add_dependencies(liblldb clang-resource-headers)
endif()
if(LLDB_BUILD_FRAMEWORK)
More information about the lldb-commits
mailing list