From 73f8cd5920c15fd747c64582586a05c16aff27bb Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 14 Apr 2021 02:45:51 +0000 Subject: [PATCH] Add symlink to clang-format-diff in /usr/bin rhbz#1939018 --- clang.spec | 10 +++++++++- tests/clang-format-diff/runtest.sh | 7 +++++++ tests/tests.yml | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 tests/clang-format-diff/runtest.sh diff --git a/clang.spec b/clang.spec index da60c58..98b6f82 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 #%%global rc_ver 1 -%global baserelease 2 +%global baserelease 3 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -424,6 +424,9 @@ popd # Remove clang-tidy headers. We don't ship the libraries for these. rm -Rvf %{buildroot}%{_includedir}/clang-tidy/ +# Add a symlink in /usr/bin to clang-format-diff +ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff + %check %if !0%{?compat_build} # requires lit.py from LLVM utilities @@ -485,6 +488,7 @@ false %{_bindir}/c-index-test %{_bindir}/find-all-symbols %{_bindir}/modularize +%{_bindir}/clang-format-diff %{_mandir}/man1/diagtool.1.gz %{_emacs_sitestartdir}/clang-format.el %{_emacs_sitestartdir}/clang-rename.el @@ -506,6 +510,10 @@ false %endif %changelog +* Wed Apr 14 2021 Tom Stellard - 11.0.0-3 +- Add symlink to clang-format-diff in /usr/bin +- rhbz#1939018 + * Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-2 - Prevent ABI conflict with release candidate - Prefer gcc toolchains with libgcc_s diff --git a/tests/clang-format-diff/runtest.sh b/tests/clang-format-diff/runtest.sh new file mode 100755 index 0000000..d27ee13 --- /dev/null +++ b/tests/clang-format-diff/runtest.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +# Check that clang-format-diff is in PATH. +# rhbz#1939018 +clang-format-diff -h diff --git a/tests/tests.yml b/tests/tests.yml index a413089..7b13736 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -19,6 +19,9 @@ - libcxx-devel - glibc-devel - gcc + # Required for clang-format-diff + - clang-tools-extra + repositories: - repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git" dest: "llvm-test-suite" @@ -33,3 +36,4 @@ - clang/rhbz_1657544 - clang/rhbz_1647130 - clang/llvm-toolchain + - clang-format-diff