build-llvm: Build clang-tools-extra
This installs a bunch of new tools in the bin dir, namely the following: clang-apply-replacements clang-change-namespace clang-doc clang-include-fixer clang-move clang-query clang-reorder-fields clang-tidy clangd find-all-symbols modularize pp-trace run-clang-tidy These are stripped out by strip-llvm, but clangd and clang-tidy are kept.
This commit is contained in:
1 parent
0dbd9baba3
commit
5ae5b1aa37
2 files changed
+20
-2
No files matched your search
+15
-1
@@ -23,6 +23,7 @@ BUILDDIR="build"
|
||||
LINK_DYLIB=ON
|
||||
ASSERTSSUFFIX=""
|
||||
LLDB=ON
|
||||
CLANG_TOOLS_EXTRA=ON
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
@@ -64,6 +65,9 @@ while [ $# -gt 0 ]; do
|
||||
--disable-lldb)
|
||||
unset LLDB
|
||||
;;
|
||||
--disable-clang-tools-extra)
|
||||
unset CLANG_TOOLS_EXTRA
|
||||
;;
|
||||
*)
|
||||
PREFIX="$1"
|
||||
;;
|
||||
@@ -73,7 +77,7 @@ done
|
||||
BUILDDIR="$BUILDDIR$ASSERTSSUFFIX"
|
||||
if [ -z "$CHECKOUT_ONLY" ]; then
|
||||
if [ -z "$PREFIX" ]; then
|
||||
echo $0 [--enable-asserts] [--stage2] [--thinlto] [--lto] [--disable-dylib] [--full-llvm] [--with-python] [--symlink-projects] [--disable-lldb] [--host=triple] dest
|
||||
echo $0 [--enable-asserts] [--stage2] [--thinlto] [--lto] [--disable-dylib] [--full-llvm] [--with-python] [--symlink-projects] [--disable-lldb] [--disable-clang-tools-extra] [--host=triple] dest
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -246,12 +250,22 @@ if [ -n "$SYMLINK_PROJECTS" ]; then
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
if [ -n "$CLANG_TOOLS_EXTRA" ]; then
|
||||
cd ../clang/tools
|
||||
if [ ! -e extra ]; then
|
||||
ln -s ../../clang-tools-extra extra
|
||||
fi
|
||||
cd ../../llvm
|
||||
fi
|
||||
else
|
||||
EXPLICIT_PROJECTS=1
|
||||
PROJECTS="clang;lld"
|
||||
if [ -n "$LLDB" ]; then
|
||||
PROJECTS="$PROJECTS;lldb"
|
||||
fi
|
||||
if [ -n "$CLANG_TOOLS_EXTRA" ]; then
|
||||
PROJECTS="$PROJECTS;clang-tools-extra"
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -z "$CLEAN" ] || rm -rf $BUILDDIR
|
||||
|
||||
+5
-1
@@ -52,7 +52,7 @@ MINGW*)
|
||||
esac
|
||||
|
||||
cd bin
|
||||
for i in bugpoint c-index-test clang-* diagtool dsymutil git-clang-format hmaptool ld64.lld* llc lldb-* lli llvm-* obj2yaml opt sancov sanstats scan-build scan-view verify-uselistorder wasm-ld yaml2obj libclang.dll *LTO.dll *Remarks.dll *.bat; do
|
||||
for i in bugpoint c-index-test clang-* clangd diagtool dsymutil find-all-symbols git-clang-format hmaptool ld64.lld* llc lldb-* lli llvm-* modularize obj2yaml opt pp-trace sancov sanstats scan-build scan-view verify-uselistorder wasm-ld yaml2obj libclang.dll *LTO.dll *Remarks.dll *.bat; do
|
||||
basename=$i
|
||||
if [ -n "$EXEEXT" ]; then
|
||||
# Some in the list are expanded globs, some are plain names we list.
|
||||
@@ -68,6 +68,10 @@ for i in bugpoint c-index-test clang-* diagtool dsymutil git-clang-format hmapto
|
||||
;;
|
||||
clang++|clang-*.*|clang-cpp)
|
||||
;;
|
||||
clangd)
|
||||
;;
|
||||
clang-tidy)
|
||||
;;
|
||||
clang-*)
|
||||
suffix="${basename#*-}"
|
||||
# Test removing all numbers from the suffix; if it is empty, the suffix
|
||||
|
||||
Reference in new issue
Block a user