Skip to content

Commit 5be71fa

Browse files
committed
[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 llvm-svn: 355340
1 parent 0632e12 commit 5be71fa

File tree

23 files changed

+48
-37
lines changed

23 files changed

+48
-37
lines changed

clang-tools-extra/clang-tidy/tool/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ add_clang_tool(clang-tidy
99
ClangTidyMain.cpp
1010
)
1111
add_dependencies(clang-tidy
12-
clang-headers
12+
clang-resource-headers
1313
)
1414
target_link_libraries(clang-tidy
1515
PRIVATE

clang-tools-extra/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ set(CLANG_TOOLS_TEST_DEPS
5959
# For the clang-tidy libclang integration test.
6060
c-index-test
6161
# clang-tidy tests require it.
62-
clang-headers
62+
clang-resource-headers
6363

6464
clang-tidy
6565
)

clang/cmake/caches/Apple-stage2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
6060
clang
6161
LTO
6262
clang-format
63-
clang-headers
63+
clang-resource-headers
6464
cxx-headers
6565
${LLVM_TOOLCHAIN_TOOLS}
6666
CACHE STRING "")

clang/cmake/caches/BaremetalARM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ set(LLVM_TOOLCHAIN_TOOLS
4141
set(LLVM_DISTRIBUTION_COMPONENTS
4242
clang
4343
lld
44-
clang-headers
44+
clang-resource-headers
4545
builtins-armv6m-none-eabi
4646
builtins-armv7m-none-eabi
4747
builtins-armv7em-none-eabi

clang/cmake/caches/DistributionExample-stage2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
2323
clang
2424
LTO
2525
clang-format
26-
clang-headers
26+
clang-resource-headers
2727
builtins
2828
runtimes
2929
${LLVM_TOOLCHAIN_TOOLS}

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
167167
LTO
168168
clang-apply-replacements
169169
clang-format
170-
clang-headers
170+
clang-resource-headers
171171
clang-include-fixer
172172
clang-refactor
173173
clang-tidy

clang/cmake/modules/AddClang.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ macro(add_clang_tool name)
133133
endif()
134134

135135
add_clang_executable(${name} ${ARGN})
136-
add_dependencies(${name} clang-headers)
136+
add_dependencies(${name} clang-resource-headers)
137137

138138
if (CLANG_BUILD_TOOLS)
139139
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR

clang/docs/LibTooling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ Clang tools need their builtin headers and search for them the same way Clang
187187
does. Thus, the default location to look for builtin headers is in a path
188188
``$(dirname /path/to/tool)/../lib/clang/3.3/include`` relative to the tool
189189
binary. This works out-of-the-box for tools running from llvm's toplevel
190-
binary directory after building clang-headers, or if the tool is running from
191-
the binary directory of a clang install next to the clang binary.
190+
binary directory after building clang-resource-headers, or if the tool is
191+
running from the binary directory of a clang install next to the clang binary.
192192

193193
Tips: if your tool fails to find ``stddef.h`` or similar headers, call the tool
194194
with ``-v`` and look at the search paths it looks through.

clang/docs/ReleaseNotes.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ABI Changes in Clang
131131
- ...
132132

133133
OpenMP Support in Clang
134-
----------------------------------
134+
-----------------------
135135

136136
- Added emission of the debug information for NVPTX target devices.
137137

@@ -147,6 +147,17 @@ These are major API changes that have happened since the 8.0.0 release of
147147
Clang. If upgrading an external codebase that uses Clang as a library,
148148
this section should help get you past the largest hurdles of upgrading.
149149

150+
Build System Changes
151+
--------------------
152+
153+
These are major changes to the build system that have happened since the 8.0.0
154+
release of Clang. Users of the build system should adjust accordingly.
155+
156+
- In 8.0.0 and below, the install-clang-headers target would install clang's
157+
resource directory headers. This installation is now performed by the
158+
install-clang-resource-headers target. Users of the old install-clang-headers
159+
target should switch to the new install-clang-resource-headers target.
160+
150161
- ...
151162

152163
AST Matchers

clang/examples/clang-interpreter/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ add_clang_executable(clang-interpreter
1616
)
1717

1818
add_dependencies(clang-interpreter
19-
clang-headers
19+
clang-resource-headers
2020
)
2121

2222
target_link_libraries(clang-interpreter

clang/lib/Headers/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h)
157157
# Generate arm_fp16.h
158158
clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h)
159159

160-
add_custom_target(clang-headers ALL DEPENDS ${out_files})
161-
set_target_properties(clang-headers PROPERTIES
160+
add_custom_target(clang-resource-headers ALL DEPENDS ${out_files})
161+
set_target_properties(clang-resource-headers PROPERTIES
162162
FOLDER "Misc"
163163
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
164164

@@ -167,10 +167,10 @@ set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
167167
install(
168168
DIRECTORY ${output_dir}
169169
DESTINATION ${header_install_dir}
170-
COMPONENT clang-headers)
170+
COMPONENT clang-resource-headers)
171171

172172
if (NOT LLVM_ENABLE_IDE)
173-
add_llvm_install_targets(install-clang-headers
174-
DEPENDS clang-headers
175-
COMPONENT clang-headers)
173+
add_llvm_install_targets(install-clang-resource-headers
174+
DEPENDS clang-resource-headers
175+
COMPONENT clang-resource-headers)
176176
endif()

clang/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if(CLANG_TEST_USE_VG)
4646
endif ()
4747

4848
list(APPEND CLANG_TEST_DEPS
49-
clang clang-headers
49+
clang clang-resource-headers
5050
clang-format
5151
c-index-test diagtool
5252
clang-tblgen

clang/tools/driver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if(CLANG_PLUGIN_SUPPORT)
6060
export_executable_symbols(clang)
6161
endif()
6262

63-
add_dependencies(clang clang-headers)
63+
add_dependencies(clang clang-resource-headers)
6464

6565
if(NOT CLANG_LINKS_TO_CREATE)
6666
set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)

clang/tools/libclang/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ endif()
9292
add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
9393
OUTPUT_NAME ${output_name}
9494
${SOURCES}
95-
DEPENDS clang-headers
95+
DEPENDS clang-resource-headers
9696

9797
LINK_LIBS
9898
${LIBS}

compiler-rt/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if(NOT ANDROID)
2020
if(NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD)
2121
# Use LLVM utils and Clang from the same build tree.
2222
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS
23-
clang clang-headers FileCheck count not llvm-config llvm-nm llvm-objdump
23+
clang clang-resource-headers FileCheck count not llvm-config llvm-nm llvm-objdump
2424
llvm-readobj llvm-symbolizer compiler-rt-headers sancov)
2525
if (WIN32)
2626
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS KillTheDoctor)

lldb/cmake/modules/LLDBFramework.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ add_custom_command(TARGET lldb-framework-headers POST_BUILD
9898

9999
# Copy vendor-specific headers from clang (without staging).
100100
if(NOT IOS AND NOT LLDB_BUILT_STANDALONE)
101-
add_dependencies(lldb-framework clang-headers)
101+
add_dependencies(lldb-framework clang-resource-headers)
102102
add_custom_command(TARGET lldb-framework POST_BUILD
103103
COMMAND ${CMAKE_COMMAND} -E copy_directory
104-
$<TARGET_PROPERTY:clang-headers,RUNTIME_OUTPUT_DIRECTORY>
104+
$<TARGET_PROPERTY:clang-resource-headers,RUNTIME_OUTPUT_DIRECTORY>
105105
$<TARGET_FILE_DIR:liblldb>/Resources/Clang/include
106106
COMMENT "LLDB.framework: copy clang vendor-specific headers"
107107
)

lldb/lldb.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7618,7 +7618,7 @@
76187618
);
76197619
runOnlyForDeploymentPostprocessing = 0;
76207620
shellPath = /bin/sh;
7621-
shellScript = "/usr/bin/python $SRCROOT/scripts/Xcode/package-clang-headers.py $TARGET_BUILD_DIR $LLVM_BUILD_DIR/x86_64\n";
7621+
shellScript = "/usr/bin/python $SRCROOT/scripts/Xcode/package-clang-resource-headers.py $TARGET_BUILD_DIR $LLVM_BUILD_DIR/x86_64\n";
76227622
};
76237623
4C3326CA18B2A2B800EB5DD7 /* ShellScript */ = {
76247624
isa = PBXShellScriptBuildPhase;

lldb/scripts/Xcode/package-clang-headers.py renamed to lldb/scripts/Xcode/package-clang-resource-headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /usr/bin/env python
22

3-
# package-clang-headers.py
3+
# package-clang-resource-headers.py
44
#
55
# The Clang module loader depends on built-in headers for the Clang compiler.
66
# We grab these from the Clang build and move them into the LLDB module.

lldb/source/API/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ else()
152152
endif()
153153

154154
if (NOT LLDB_BUILT_STANDALONE)
155-
add_dependencies(liblldb clang-headers)
155+
add_dependencies(liblldb clang-resource-headers)
156156
endif()
157157

158158
if(LLDB_BUILD_FRAMEWORK)

llvm/docs/Docker.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ compiled by the system compiler in the debian8 image:
7979
./llvm/utils/docker/build_docker_image.sh \
8080
--source debian8 \
8181
--docker-repository clang-debian8 --docker-tag "staging" \
82-
-p clang -i install-clang -i install-clang-headers \
82+
-p clang -i install-clang -i install-clang-resource-headers \
8383
-- \
8484
-DCMAKE_BUILD_TYPE=Release
8585
@@ -95,11 +95,11 @@ this command will do that:
9595
./build_docker_image.sh \
9696
--source debian8 \
9797
--docker-repository clang-debian8 --docker-tag "staging" \
98-
-p clang -i stage2-install-clang -i stage2-install-clang-headers \
98+
-p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
9999
-- \
100100
-DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
101101
-DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
102-
-DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
102+
-DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
103103
104104
This will produce a new image ``clang-debian8:staging`` from the latest
105105
upstream revision.
@@ -165,7 +165,7 @@ debian8-based image using the latest ``google/stable`` sources for you:
165165
./llvm/utils/docker/build_docker_image.sh \
166166
-s debian8 --d clang-debian8 -t "staging" \
167167
--branch branches/google/stable \
168-
-p clang -i install-clang -i install-clang-headers \
168+
-p clang -i install-clang -i install-clang-resource-headers \
169169
-- \
170170
-DCMAKE_BUILD_TYPE=Release
171171

llvm/runtimes/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ else() # if this is included from LLVM's CMake
273273
if(compiler_rt_path)
274274
if(NOT LLVM_BUILTIN_TARGETS)
275275
builtin_default_target(${compiler_rt_path}
276-
DEPENDS clang-headers)
276+
DEPENDS clang-resource-headers)
277277
else()
278278
if("default" IN_LIST LLVM_BUILTIN_TARGETS)
279279
builtin_default_target(${compiler_rt_path}
280-
DEPENDS clang-headers)
280+
DEPENDS clang-resource-headers)
281281
list(REMOVE_ITEM LLVM_BUILTIN_TARGETS "default")
282282
else()
283283
add_custom_target(builtins)
@@ -287,7 +287,7 @@ else() # if this is included from LLVM's CMake
287287

288288
foreach(target ${LLVM_BUILTIN_TARGETS})
289289
builtin_register_target(${compiler_rt_path} ${target}
290-
DEPENDS clang-headers)
290+
DEPENDS clang-resource-headers)
291291

292292
add_dependencies(builtins builtins-${target})
293293
add_dependencies(install-builtins install-builtins-${target})

llvm/utils/docker/build_docker_image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ All options after '--' are passed to CMake invocation.
5555
5656
For example, running:
5757
$ build_docker_image.sh -s debian8 -d mydocker/debian8-clang -t latest \
58-
-p clang -i install-clang -i install-clang-headers
58+
-p clang -i install-clang -i install-clang-resource-headers
5959
will produce two docker images:
6060
mydocker/debian8-clang-build:latest - an intermediate image used to compile
6161
clang.
@@ -66,12 +66,12 @@ version of clang.
6666
6767
To get a 2-stage clang build, you could use this command:
6868
$ ./build_docker_image.sh -s debian8 -d mydocker/clang-debian8 -t "latest" \
69-
-p clang -i stage2-install-clang -i stage2-install-clang-headers \
69+
-p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
7070
-- \
7171
-DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
7272
-DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
7373
-DCLANG_ENABLE_BOOTSTRAP=ON \
74-
-DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
74+
-DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
7575
EOF
7676
}
7777

openmp/cmake/OpenMPTesting.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function(add_openmp_testsuite target comment)
167167
add_lit_testsuite(${target}
168168
${comment}
169169
${ARG_UNPARSED_ARGUMENTS}
170-
DEPENDS clang clang-headers FileCheck ${ARG_DEPENDS}
170+
DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
171171
ARGS ${ARG_ARGS}
172172
)
173173
endif()

0 commit comments

Comments
 (0)