[crux-commits] ports/opt (3.6): clang: use system llvm, include extra tools

crux at crux.nu crux at crux.nu
Mon Jul 6 14:14:13 UTC 2020


commit 35f5bcab38bf6039fef44389896555e0ba8bc1e6
Author: Juergen Daubert <jue at jue.li>
Date:   Mon Jul 6 16:13:46 2020 +0200

    clang: use system llvm, include extra tools

diff --git a/clang/.footprint b/clang/.footprint
index 1c7a14412..0272ebbae 100644
--- a/clang/.footprint
+++ b/clang/.footprint
@@ -4,20 +4,32 @@ drwxr-xr-x	root/root	usr/bin/
 lrwxrwxrwx	root/root	usr/bin/clang -> clang-10
 lrwxrwxrwx	root/root	usr/bin/clang++ -> clang
 -rwxr-xr-x	root/root	usr/bin/clang-10
+-rwxr-xr-x	root/root	usr/bin/clang-apply-replacements
+-rwxr-xr-x	root/root	usr/bin/clang-change-namespace
 -rwxr-xr-x	root/root	usr/bin/clang-check
 lrwxrwxrwx	root/root	usr/bin/clang-cl -> clang
 lrwxrwxrwx	root/root	usr/bin/clang-cpp -> clang
+-rwxr-xr-x	root/root	usr/bin/clang-doc
 -rwxr-xr-x	root/root	usr/bin/clang-extdef-mapping
 -rwxr-xr-x	root/root	usr/bin/clang-format
 -rwxr-xr-x	root/root	usr/bin/clang-import-test
+-rwxr-xr-x	root/root	usr/bin/clang-include-fixer
+-rwxr-xr-x	root/root	usr/bin/clang-move
 -rwxr-xr-x	root/root	usr/bin/clang-offload-bundler
 -rwxr-xr-x	root/root	usr/bin/clang-offload-wrapper
+-rwxr-xr-x	root/root	usr/bin/clang-query
 -rwxr-xr-x	root/root	usr/bin/clang-refactor
 -rwxr-xr-x	root/root	usr/bin/clang-rename
+-rwxr-xr-x	root/root	usr/bin/clang-reorder-fields
 -rwxr-xr-x	root/root	usr/bin/clang-scan-deps
+-rwxr-xr-x	root/root	usr/bin/clang-tidy
+-rwxr-xr-x	root/root	usr/bin/clangd
 -rwxr-xr-x	root/root	usr/bin/diagtool
+-rwxr-xr-x	root/root	usr/bin/find-all-symbols
 -rwxr-xr-x	root/root	usr/bin/git-clang-format
 -rwxr-xr-x	root/root	usr/bin/hmaptool
+-rwxr-xr-x	root/root	usr/bin/modularize
+-rwxr-xr-x	root/root	usr/bin/pp-trace
 -rwxr-xr-x	root/root	usr/bin/scan-build
 -rwxr-xr-x	root/root	usr/bin/scan-view
 drwxr-xr-x	root/root	usr/include/
@@ -824,6 +836,12 @@ drwxr-xr-x	root/root	usr/lib/clang/10.0.0/include/ppc_wrappers/
 -rw-r--r--	root/root	usr/lib/clang/10.0.0/include/xsaveoptintrin.h
 -rw-r--r--	root/root	usr/lib/clang/10.0.0/include/xsavesintrin.h
 -rw-r--r--	root/root	usr/lib/clang/10.0.0/include/xtestintrin.h
+drwxr-xr-x	root/root	usr/lib/clang/10.0.0/share/
+lrwxrwxrwx	root/root	usr/lib/clang/10.0.0/share/asan_blacklist.txt -> /usr/share/asan_blacklist.txt
+lrwxrwxrwx	root/root	usr/lib/clang/10.0.0/share/cfi_blacklist.txt -> /usr/share/cfi_blacklist.txt
+lrwxrwxrwx	root/root	usr/lib/clang/10.0.0/share/dfsan_abilist.txt -> /usr/share/dfsan_abilist.txt
+lrwxrwxrwx	root/root	usr/lib/clang/10.0.0/share/hwasan_blacklist.txt -> /usr/share/hwasan_blacklist.txt
+lrwxrwxrwx	root/root	usr/lib/clang/10.0.0/share/msan_blacklist.txt -> /usr/share/msan_blacklist.txt
 -rwxr-xr-x	root/root	usr/lib/clang/c++-analyzer
 -rwxr-xr-x	root/root	usr/lib/clang/ccc-analyzer
 drwxr-xr-x	root/root	usr/lib/cmake/
@@ -839,11 +857,16 @@ lrwxrwxrwx	root/root	usr/lib/libclang.so -> libclang.so.10
 -rw-r--r--	root/root	usr/lib/libclangAST.a
 -rw-r--r--	root/root	usr/lib/libclangASTMatchers.a
 -rw-r--r--	root/root	usr/lib/libclangAnalysis.a
+-rw-r--r--	root/root	usr/lib/libclangApplyReplacements.a
 -rw-r--r--	root/root	usr/lib/libclangBasic.a
+-rw-r--r--	root/root	usr/lib/libclangChangeNamespace.a
 -rw-r--r--	root/root	usr/lib/libclangCodeGen.a
 -rw-r--r--	root/root	usr/lib/libclangCrossTU.a
+-rw-r--r--	root/root	usr/lib/libclangDaemon.a
+-rw-r--r--	root/root	usr/lib/libclangDaemonTweaks.a
 -rw-r--r--	root/root	usr/lib/libclangDependencyScanning.a
 -rw-r--r--	root/root	usr/lib/libclangDirectoryWatcher.a
+-rw-r--r--	root/root	usr/lib/libclangDoc.a
 -rw-r--r--	root/root	usr/lib/libclangDriver.a
 -rw-r--r--	root/root	usr/lib/libclangDynamicASTMatchers.a
 -rw-r--r--	root/root	usr/lib/libclangEdit.a
@@ -852,9 +875,14 @@ lrwxrwxrwx	root/root	usr/lib/libclang.so -> libclang.so.10
 -rw-r--r--	root/root	usr/lib/libclangFrontendTool.a
 -rw-r--r--	root/root	usr/lib/libclangHandleCXX.a
 -rw-r--r--	root/root	usr/lib/libclangHandleLLVM.a
+-rw-r--r--	root/root	usr/lib/libclangIncludeFixer.a
+-rw-r--r--	root/root	usr/lib/libclangIncludeFixerPlugin.a
 -rw-r--r--	root/root	usr/lib/libclangIndex.a
 -rw-r--r--	root/root	usr/lib/libclangLex.a
+-rw-r--r--	root/root	usr/lib/libclangMove.a
 -rw-r--r--	root/root	usr/lib/libclangParse.a
+-rw-r--r--	root/root	usr/lib/libclangQuery.a
+-rw-r--r--	root/root	usr/lib/libclangReorderFields.a
 -rw-r--r--	root/root	usr/lib/libclangRewrite.a
 -rw-r--r--	root/root	usr/lib/libclangRewriteFrontend.a
 -rw-r--r--	root/root	usr/lib/libclangSema.a
@@ -862,6 +890,30 @@ lrwxrwxrwx	root/root	usr/lib/libclang.so -> libclang.so.10
 -rw-r--r--	root/root	usr/lib/libclangStaticAnalyzerCheckers.a
 -rw-r--r--	root/root	usr/lib/libclangStaticAnalyzerCore.a
 -rw-r--r--	root/root	usr/lib/libclangStaticAnalyzerFrontend.a
+-rw-r--r--	root/root	usr/lib/libclangTidy.a
+-rw-r--r--	root/root	usr/lib/libclangTidyAbseilModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyAndroidModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyBoostModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyBugproneModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyCERTModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyCppCoreGuidelinesModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyDarwinModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyFuchsiaModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyGoogleModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyHICPPModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyLLVMModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyLinuxKernelModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyMPIModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyMiscModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyModernizeModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyObjCModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyOpenMPModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyPerformanceModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyPlugin.a
+-rw-r--r--	root/root	usr/lib/libclangTidyPortabilityModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyReadabilityModule.a
+-rw-r--r--	root/root	usr/lib/libclangTidyUtils.a
+-rw-r--r--	root/root	usr/lib/libclangTidyZirconModule.a
 -rw-r--r--	root/root	usr/lib/libclangTooling.a
 -rw-r--r--	root/root	usr/lib/libclangToolingASTDiff.a
 -rw-r--r--	root/root	usr/lib/libclangToolingCore.a
@@ -869,16 +921,24 @@ lrwxrwxrwx	root/root	usr/lib/libclang.so -> libclang.so.10
 -rw-r--r--	root/root	usr/lib/libclangToolingRefactoring.a
 -rw-r--r--	root/root	usr/lib/libclangToolingSyntax.a
 -rw-r--r--	root/root	usr/lib/libclangTransformer.a
+-rw-r--r--	root/root	usr/lib/libfindAllSymbols.a
 drwxr-xr-x	root/root	usr/share/
 drwxr-xr-x	root/root	usr/share/clang/
 -rwxr-xr-x	root/root	usr/share/clang/bash-autocomplete.sh
+-rw-r--r--	root/root	usr/share/clang/clang-doc-default-stylesheet.css
 -rwxr-xr-x	root/root	usr/share/clang/clang-format-bbedit.applescript
 -rwxr-xr-x	root/root	usr/share/clang/clang-format-diff.py
 -rwxr-xr-x	root/root	usr/share/clang/clang-format-sublime.py
 -rwxr-xr-x	root/root	usr/share/clang/clang-format.el
 -rwxr-xr-x	root/root	usr/share/clang/clang-format.py
+-rwxr-xr-x	root/root	usr/share/clang/clang-include-fixer.el
+-rwxr-xr-x	root/root	usr/share/clang/clang-include-fixer.py
 -rwxr-xr-x	root/root	usr/share/clang/clang-rename.el
 -rwxr-xr-x	root/root	usr/share/clang/clang-rename.py
+-rwxr-xr-x	root/root	usr/share/clang/clang-tidy-diff.py
+-rw-r--r--	root/root	usr/share/clang/index.js
+-rwxr-xr-x	root/root	usr/share/clang/run-clang-tidy.py
+-rwxr-xr-x	root/root	usr/share/clang/run-find-all-symbols.py
 drwxr-xr-x	root/root	usr/share/man/
 drwxr-xr-x	root/root	usr/share/man/man1/
 -rwxr-xr-x	root/root	usr/share/man/man1/scan-build.1.gz
diff --git a/clang/.signature b/clang/.signature
index 63defbee4..44bc17643 100644
--- a/clang/.signature
+++ b/clang/.signature
@@ -1,6 +1,6 @@
 untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/b34kKo3py6f/tOY281XT0rLVcjuWsFIEsJo0Wg+xGVwT13qm2tt0oo/e7nNsPMcvGKjLy2hpiCjD6oc+wohIgE=
-SHA256 (Pkgfile) = 3a42ae75e3e1242c2a465f656ff0a55ee66db57299dd141cb3be82d16042d5e6
-SHA256 (.footprint) = d344a5936d372b795391343c43253f1cc7e0bdf0532edbaf6cb54f1ad97ad162
-SHA256 (llvm-10.0.0.src.tar.xz) = df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf
+RWSE3ohX2g5d/T2eZS8bVE9bStPOrX9vU25/qz/MJc5xoq4QfWp6aPhfeVA7mnnNDZHjuEnHoB+uqSRlWYxd0panTmNmwjyGSAQ=
+SHA256 (Pkgfile) = 432dedff3ec19ce47cb3c0768b4df4b5812748a45c6e6793d0b3e8ec8765c175
+SHA256 (.footprint) = 79b48833092639ef9720757dddd59d9499663c4b87bd5587b2ff860274d4fc26
 SHA256 (clang-10.0.0.src.tar.xz) = 885b062b00e903df72631c5f98b9579ed1ed2790f74e5646b4234fa084eacb21
+SHA256 (clang-tools-extra-10.0.0.src.tar.xz) = acdf8cf6574b40e6b1dabc93e76debb84a9feb6f22970126b04d4ba18b92911c
diff --git a/clang/Pkgfile b/clang/Pkgfile
index ed5506eb8..dc4af90f6 100644
--- a/clang/Pkgfile
+++ b/clang/Pkgfile
@@ -1,43 +1,33 @@
-# Description: LLVM + clang compiler
-# URL:         http://llvm.org/
+# Description: clang compiler
+# URL:         https://clang.llvm.org/
 # Maintainer:  Thomas Penteker, tek at serverop dot de
-# Depends on:  llvm
+# Depends on:  compiler-rt llvm
 
 name=clang
 version=10.0.0
 release=1
-source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/{llvm,clang}-$version.src.tar.xz)
+source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/$name-$version.src.tar.xz
+        https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/$name-tools-extra-$version.src.tar.xz)
 
 build() {
-  mv clang-$version.src llvm-$version.src/tools/clang
+  mv $name-tools-extra-$version.src $name-$version.src/tools/extra
 
-  cd llvm-$version.src
-  mkdir build
-  cd build
-
-  cmake .. -G Ninja \
-    -DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
-    -DLLVM_INCLUDE_EXAMPLES=0 \
-    -DLLVM_INCLUDE_TESTS=0 \
-    -DLLVM_ENABLE_FFI=1 \
-    -DLLVM_ENABLE_RTTI=1 \
-    -DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
-    -DCMAKE_BUILD_TYPE=Release \
+  cmake -S$name-$version.src -Bbuild -GNinja \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLLVM_APPEND_VC_REV=0 \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DLLVM_INCLUDE_TESTS=0 \
+    -DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
     -Wno-dev
+  cmake --build build
+  DESTDIR=$PKG cmake --install build
 
-  ninja
-  DESTDIR=$PKG ninja install
-
-  # only clang may be left, remove llvm
-  rm -r $PKG/usr/include/llvm{,-c}
-  rm -r $PKG/usr/lib/cmake/llvm
-  rm -r $PKG/usr/share/opt-viewer
-  rm $PKG/usr/bin/{bugpoint,ll*,opt,obj2yaml,sancov,sanstats,verify-uselistorder,yaml2obj,dsymutil}
-  rm $PKG/usr/lib/{libLTO.*,libRemarks*,libLLVM*}
-
+  # -DCMAKE_INSTALL_LIBEXECDIR is hardcoded..
   mv $PKG/usr/libexec/{c++-analyzer,ccc-analyzer} $PKG/usr/lib/clang
   rmdir $PKG/usr/libexec
   sed -i 's|libexec|lib/clang|' $PKG/usr/bin/scan-build
+
+  # prepare compiler-rt
+  local txtfiles="asan_blacklist.txt cfi_blacklist.txt dfsan_abilist.txt hwasan_blacklist.txt msan_blacklist.txt"
+  mkdir -p $PKG/usr/lib/clang/$version/share
+  for i in $txtfiles; do ln -s /usr/share/$i $PKG/usr/lib/clang/$version/share/$i; done
 }


More information about the crux-commits mailing list