forked from OSchip/llvm-project
[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
This commit is contained in:
parent
0632e12f89
commit
5be71faf4b
|
@ -9,7 +9,7 @@ add_clang_tool(clang-tidy
|
|||
ClangTidyMain.cpp
|
||||
)
|
||||
add_dependencies(clang-tidy
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
)
|
||||
target_link_libraries(clang-tidy
|
||||
PRIVATE
|
||||
|
|
|
@ -59,7 +59,7 @@ set(CLANG_TOOLS_TEST_DEPS
|
|||
# For the clang-tidy libclang integration test.
|
||||
c-index-test
|
||||
# clang-tidy tests require it.
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
|
||||
clang-tidy
|
||||
)
|
||||
|
|
|
@ -60,7 +60,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
|
|||
clang
|
||||
LTO
|
||||
clang-format
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
cxx-headers
|
||||
${LLVM_TOOLCHAIN_TOOLS}
|
||||
CACHE STRING "")
|
||||
|
|
|
@ -41,7 +41,7 @@ set(LLVM_TOOLCHAIN_TOOLS
|
|||
set(LLVM_DISTRIBUTION_COMPONENTS
|
||||
clang
|
||||
lld
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
builtins-armv6m-none-eabi
|
||||
builtins-armv7m-none-eabi
|
||||
builtins-armv7em-none-eabi
|
||||
|
|
|
@ -23,7 +23,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
|
|||
clang
|
||||
LTO
|
||||
clang-format
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
builtins
|
||||
runtimes
|
||||
${LLVM_TOOLCHAIN_TOOLS}
|
||||
|
|
|
@ -167,7 +167,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS
|
|||
LTO
|
||||
clang-apply-replacements
|
||||
clang-format
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
clang-include-fixer
|
||||
clang-refactor
|
||||
clang-tidy
|
||||
|
|
|
@ -133,7 +133,7 @@ macro(add_clang_tool name)
|
|||
endif()
|
||||
|
||||
add_clang_executable(${name} ${ARGN})
|
||||
add_dependencies(${name} clang-headers)
|
||||
add_dependencies(${name} clang-resource-headers)
|
||||
|
||||
if (CLANG_BUILD_TOOLS)
|
||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
|
|
|
@ -187,8 +187,8 @@ Clang tools need their builtin headers and search for them the same way Clang
|
|||
does. Thus, the default location to look for builtin headers is in a path
|
||||
``$(dirname /path/to/tool)/../lib/clang/3.3/include`` relative to the tool
|
||||
binary. This works out-of-the-box for tools running from llvm's toplevel
|
||||
binary directory after building clang-headers, or if the tool is running from
|
||||
the binary directory of a clang install next to the clang binary.
|
||||
binary directory after building clang-resource-headers, or if the tool is
|
||||
running from the binary directory of a clang install next to the clang binary.
|
||||
|
||||
Tips: if your tool fails to find ``stddef.h`` or similar headers, call the tool
|
||||
with ``-v`` and look at the search paths it looks through.
|
||||
|
|
|
@ -131,7 +131,7 @@ ABI Changes in Clang
|
|||
- ...
|
||||
|
||||
OpenMP Support in Clang
|
||||
----------------------------------
|
||||
-----------------------
|
||||
|
||||
- Added emission of the debug information for NVPTX target devices.
|
||||
|
||||
|
@ -147,6 +147,17 @@ These are major API changes that have happened since the 8.0.0 release of
|
|||
Clang. If upgrading an external codebase that uses Clang as a library,
|
||||
this section should help get you past the largest hurdles of upgrading.
|
||||
|
||||
Build System Changes
|
||||
--------------------
|
||||
|
||||
These are major changes to the build system that have happened since the 8.0.0
|
||||
release of Clang. Users of the build system should adjust accordingly.
|
||||
|
||||
- In 8.0.0 and below, the install-clang-headers target would install clang's
|
||||
resource directory headers. This installation is now performed by the
|
||||
install-clang-resource-headers target. Users of the old install-clang-headers
|
||||
target should switch to the new install-clang-resource-headers target.
|
||||
|
||||
- ...
|
||||
|
||||
AST Matchers
|
||||
|
|
|
@ -16,7 +16,7 @@ add_clang_executable(clang-interpreter
|
|||
)
|
||||
|
||||
add_dependencies(clang-interpreter
|
||||
clang-headers
|
||||
clang-resource-headers
|
||||
)
|
||||
|
||||
target_link_libraries(clang-interpreter
|
||||
|
|
|
@ -157,8 +157,8 @@ clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h)
|
|||
# Generate arm_fp16.h
|
||||
clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h)
|
||||
|
||||
add_custom_target(clang-headers ALL DEPENDS ${out_files})
|
||||
set_target_properties(clang-headers PROPERTIES
|
||||
add_custom_target(clang-resource-headers ALL DEPENDS ${out_files})
|
||||
set_target_properties(clang-resource-headers PROPERTIES
|
||||
FOLDER "Misc"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
|
||||
|
||||
|
@ -167,10 +167,10 @@ set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
|
|||
install(
|
||||
DIRECTORY ${output_dir}
|
||||
DESTINATION ${header_install_dir}
|
||||
COMPONENT clang-headers)
|
||||
COMPONENT clang-resource-headers)
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-clang-headers
|
||||
DEPENDS clang-headers
|
||||
COMPONENT clang-headers)
|
||||
add_llvm_install_targets(install-clang-resource-headers
|
||||
DEPENDS clang-resource-headers
|
||||
COMPONENT clang-resource-headers)
|
||||
endif()
|
||||
|
|
|
@ -46,7 +46,7 @@ if(CLANG_TEST_USE_VG)
|
|||
endif ()
|
||||
|
||||
list(APPEND CLANG_TEST_DEPS
|
||||
clang clang-headers
|
||||
clang clang-resource-headers
|
||||
clang-format
|
||||
c-index-test diagtool
|
||||
clang-tblgen
|
||||
|
|
|
@ -60,7 +60,7 @@ if(CLANG_PLUGIN_SUPPORT)
|
|||
export_executable_symbols(clang)
|
||||
endif()
|
||||
|
||||
add_dependencies(clang clang-headers)
|
||||
add_dependencies(clang clang-resource-headers)
|
||||
|
||||
if(NOT CLANG_LINKS_TO_CREATE)
|
||||
set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)
|
||||
|
|
|
@ -92,7 +92,7 @@ endif()
|
|||
add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
|
||||
OUTPUT_NAME ${output_name}
|
||||
${SOURCES}
|
||||
DEPENDS clang-headers
|
||||
DEPENDS clang-resource-headers
|
||||
|
||||
LINK_LIBS
|
||||
${LIBS}
|
||||
|
|
|
@ -20,7 +20,7 @@ if(NOT ANDROID)
|
|||
if(NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD)
|
||||
# Use LLVM utils and Clang from the same build tree.
|
||||
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS
|
||||
clang clang-headers FileCheck count not llvm-config llvm-nm llvm-objdump
|
||||
clang clang-resource-headers FileCheck count not llvm-config llvm-nm llvm-objdump
|
||||
llvm-readobj llvm-symbolizer compiler-rt-headers sancov)
|
||||
if (WIN32)
|
||||
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS KillTheDoctor)
|
||||
|
|
|
@ -98,10 +98,10 @@ add_custom_command(TARGET lldb-framework-headers POST_BUILD
|
|||
|
||||
# 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"
|
||||
)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
# package-clang-headers.py
|
||||
# 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.
|
|
@ -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)
|
||||
|
|
|
@ -79,7 +79,7 @@ compiled by the system compiler in the debian8 image:
|
|||
./llvm/utils/docker/build_docker_image.sh \
|
||||
--source debian8 \
|
||||
--docker-repository clang-debian8 --docker-tag "staging" \
|
||||
-p clang -i install-clang -i install-clang-headers \
|
||||
-p clang -i install-clang -i install-clang-resource-headers \
|
||||
-- \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
|
@ -95,11 +95,11 @@ this command will do that:
|
|||
./build_docker_image.sh \
|
||||
--source debian8 \
|
||||
--docker-repository clang-debian8 --docker-tag "staging" \
|
||||
-p clang -i stage2-install-clang -i stage2-install-clang-headers \
|
||||
-p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
|
||||
-- \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
|
||||
-DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
|
||||
-DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
|
||||
|
||||
This will produce a new image ``clang-debian8:staging`` from the latest
|
||||
upstream revision.
|
||||
|
@ -165,7 +165,7 @@ debian8-based image using the latest ``google/stable`` sources for you:
|
|||
./llvm/utils/docker/build_docker_image.sh \
|
||||
-s debian8 --d clang-debian8 -t "staging" \
|
||||
--branch branches/google/stable \
|
||||
-p clang -i install-clang -i install-clang-headers \
|
||||
-p clang -i install-clang -i install-clang-resource-headers \
|
||||
-- \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
|
|
|
@ -273,11 +273,11 @@ else() # if this is included from LLVM's CMake
|
|||
if(compiler_rt_path)
|
||||
if(NOT LLVM_BUILTIN_TARGETS)
|
||||
builtin_default_target(${compiler_rt_path}
|
||||
DEPENDS clang-headers)
|
||||
DEPENDS clang-resource-headers)
|
||||
else()
|
||||
if("default" IN_LIST LLVM_BUILTIN_TARGETS)
|
||||
builtin_default_target(${compiler_rt_path}
|
||||
DEPENDS clang-headers)
|
||||
DEPENDS clang-resource-headers)
|
||||
list(REMOVE_ITEM LLVM_BUILTIN_TARGETS "default")
|
||||
else()
|
||||
add_custom_target(builtins)
|
||||
|
@ -287,7 +287,7 @@ else() # if this is included from LLVM's CMake
|
|||
|
||||
foreach(target ${LLVM_BUILTIN_TARGETS})
|
||||
builtin_register_target(${compiler_rt_path} ${target}
|
||||
DEPENDS clang-headers)
|
||||
DEPENDS clang-resource-headers)
|
||||
|
||||
add_dependencies(builtins builtins-${target})
|
||||
add_dependencies(install-builtins install-builtins-${target})
|
||||
|
|
|
@ -55,7 +55,7 @@ All options after '--' are passed to CMake invocation.
|
|||
|
||||
For example, running:
|
||||
$ build_docker_image.sh -s debian8 -d mydocker/debian8-clang -t latest \
|
||||
-p clang -i install-clang -i install-clang-headers
|
||||
-p clang -i install-clang -i install-clang-resource-headers
|
||||
will produce two docker images:
|
||||
mydocker/debian8-clang-build:latest - an intermediate image used to compile
|
||||
clang.
|
||||
|
@ -66,12 +66,12 @@ version of clang.
|
|||
|
||||
To get a 2-stage clang build, you could use this command:
|
||||
$ ./build_docker_image.sh -s debian8 -d mydocker/clang-debian8 -t "latest" \
|
||||
-p clang -i stage2-install-clang -i stage2-install-clang-headers \
|
||||
-p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
|
||||
-- \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
|
||||
-DCLANG_ENABLE_BOOTSTRAP=ON \
|
||||
-DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
|
||||
-DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ function(add_openmp_testsuite target comment)
|
|||
add_lit_testsuite(${target}
|
||||
${comment}
|
||||
${ARG_UNPARSED_ARGUMENTS}
|
||||
DEPENDS clang clang-headers FileCheck ${ARG_DEPENDS}
|
||||
DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
|
||||
ARGS ${ARG_ARGS}
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue