Skip to content

Commit

Permalink
[build] Rename clang-headers to clang-resource-headers
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355340 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
smeenai committed Mar 4, 2019
1 parent f3d5cf2 commit 0c844eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/Docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand Down
6 changes: 3 additions & 3 deletions utils/docker/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
}

Expand Down

0 comments on commit 0c844eb

Please sign in to comment.