From decf2a211e768c6d8206f8bf3cb7ebb4466fde86 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Mar 2023 09:54:47 +0000 Subject: [PATCH] import clang-15.0.7-1.module+el8.8.0+17939+b58878af --- .clang.metadata | 6 +- .gitignore | 6 +- ...a-Make-test-dependency-on-LLVMHello-.patch | 82 +++++++++++ ...ATCH-clang-Produce-DWARF4-by-default.patch | 78 +++++------ SOURCES/clang-14.0.6.src.tar.xz.sig | Bin 566 -> 0 bytes SOURCES/clang-15.0.7.src.tar.xz.sig | Bin 0 -> 566 bytes .../clang-tools-extra-14.0.6.src.tar.xz.sig | Bin 566 -> 0 bytes .../clang-tools-extra-15.0.7.src.tar.xz.sig | Bin 0 -> 566 bytes SOURCES/clangd-tests.patch | 128 ------------------ SOURCES/llvm-hello.patch | 61 --------- SOURCES/remove-test.patch | 20 --- SPECS/clang.spec | 30 ++-- 12 files changed, 144 insertions(+), 267 deletions(-) create mode 100644 SOURCES/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch delete mode 100644 SOURCES/clang-14.0.6.src.tar.xz.sig create mode 100644 SOURCES/clang-15.0.7.src.tar.xz.sig delete mode 100644 SOURCES/clang-tools-extra-14.0.6.src.tar.xz.sig create mode 100644 SOURCES/clang-tools-extra-15.0.7.src.tar.xz.sig delete mode 100644 SOURCES/clangd-tests.patch delete mode 100644 SOURCES/llvm-hello.patch delete mode 100644 SOURCES/remove-test.patch diff --git a/.clang.metadata b/.clang.metadata index a2655c0..47b73f1 100644 --- a/.clang.metadata +++ b/.clang.metadata @@ -1,3 +1,3 @@ -88442d295bc0b96df7cf3d526ed9eabd7a214ac2 SOURCES/clang-14.0.6.src.tar.xz -dac5046f0eb81e6c47432cf80229599befbf273e SOURCES/clang-tools-extra-14.0.6.src.tar.xz -b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc +7b4d1188cce1ce4ea1cf2ea362fba685c4aca34d SOURCES/clang-15.0.7.src.tar.xz +752fe847136eff2dfbfcc8bbddfaa9319532d104 SOURCES/clang-tools-extra-15.0.7.src.tar.xz +347bdd5ee6d6b93c9644c268511815912c0fb2dc SOURCES/release-keys.asc diff --git a/.gitignore b/.gitignore index be7fa0a..eb8253e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/clang-14.0.6.src.tar.xz -SOURCES/clang-tools-extra-14.0.6.src.tar.xz -SOURCES/tstellar-gpg-key.asc +SOURCES/clang-15.0.7.src.tar.xz +SOURCES/clang-tools-extra-15.0.7.src.tar.xz +SOURCES/release-keys.asc diff --git a/SOURCES/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch b/SOURCES/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch new file mode 100644 index 0000000..8f30ef4 --- /dev/null +++ b/SOURCES/0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch @@ -0,0 +1,82 @@ +From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Fri, 1 Jul 2022 21:24:17 -0700 +Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional + +This fixes clang + clang-tools-extra standalone build after +36892727e4f19a60778e371d78f8fb09d8122c85. +--- + clang-tools-extra/test/CMakeLists.txt | 10 +++++++++- + clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +- + clang-tools-extra/test/lit.cfg.py | 3 +++ + clang-tools-extra/test/lit.site.cfg.py.in | 1 + + 4 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt +index f4c529ee8af2..1cfb4dd529aa 100644 +--- a/clang-tools-extra/test/CMakeLists.txt ++++ b/clang-tools-extra/test/CMakeLists.txt +@@ -7,10 +7,15 @@ + set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") + set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") + ++if (TARGET LLVMHello) ++ set (LLVM_HAS_LLVM_HELLO 1) ++endif() ++ + llvm_canonicalize_cmake_booleans( + CLANG_TIDY_ENABLE_STATIC_ANALYZER + CLANG_PLUGIN_SUPPORT + LLVM_INSTALL_TOOLCHAIN_ONLY ++ LLVM_HAS_LLVM_HELLO + ) + + configure_lit_site_cfg( +@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + endif() + + if(TARGET CTTestTidyModule) +- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ if (TARGET LLVMHello) ++ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) ++ endif() + target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") + if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) + set(LLVM_LINK_COMPONENTS +diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +index c66a94f458cf..b4e7a5d691e5 100644 +--- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp ++++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp +@@ -1,4 +1,4 @@ +-// REQUIRES: plugins ++// REQUIRES: plugins, llvm-hello + // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s + // CHECK-LIST: Enabled checks: + // CHECK-LIST-NEXT: mytest1 +diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py +index 9b99bfd93440..3fca9f25fb48 100644 +--- a/clang-tools-extra/test/lit.cfg.py ++++ b/clang-tools-extra/test/lit.cfg.py +@@ -59,3 +59,6 @@ config.substitutions.append( + # Plugins (loadable modules) + if config.has_plugins and config.llvm_plugin_ext: + config.available_features.add('plugins') ++ ++if config.has_llvm_hello: ++ config.available_features.add("llvm-hello") +diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in +index 4eb830a1baf1..6e5559348454 100644 +--- a/clang-tools-extra/test/lit.site.cfg.py.in ++++ b/clang-tools-extra/test/lit.site.cfg.py.in +@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@" + config.host_triple = "@LLVM_HOST_TRIPLE@" + config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ + config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ ++config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ + # Support substitution of the tools and libs dirs with user parameters. This is + # used when we can't determine the tool dir at configuration time. + config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") +-- +2.27.0 + diff --git a/SOURCES/0010-PATCH-clang-Produce-DWARF4-by-default.patch b/SOURCES/0010-PATCH-clang-Produce-DWARF4-by-default.patch index d05b776..2d698c5 100644 --- a/SOURCES/0010-PATCH-clang-Produce-DWARF4-by-default.patch +++ b/SOURCES/0010-PATCH-clang-Produce-DWARF4-by-default.patch @@ -1,7 +1,7 @@ -From 6509777d4c12a42c7487814d868375a86712bf5b Mon Sep 17 00:00:00 2001 +From 1f68d73910ddee1beaf3582480b8a9738c941a43 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 24 Mar 2022 09:44:21 +0100 -Subject: [PATCH][clang]Produce DWARF4 by default +Subject: [PATCH] Produce DWARF4 by default Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream: @@ -10,16 +10,17 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8 clang/include/clang/Driver/ToolChain.h | 2 +- clang/test/CodeGen/dwarf-version.c | 4 ++-- clang/test/Driver/cl-options.c | 2 +- + clang/test/Driver/clang-g-opts.c | 2 +- clang/test/Driver/ve-toolchain.c | 2 +- clang/test/Driver/ve-toolchain.cpp | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) + 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h -index adf1753e8d3a..c8adc4d917ce 100644 +index f20ab164531b..53c86ee82936 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h -@@ -515,7 +515,7 @@ public: - +@@ -535,7 +535,7 @@ public: + // Return the DWARF version to emit, in the absence of arguments // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 5; } @@ -43,10 +44,10 @@ index 0a6fa4768026..96f01749d0d8 100644 // The -isysroot is used as a hack to avoid LIT messing with the SDKROOT // environment variable which indirecty overrides the version in the target diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c -index f332cd83b26e..911779fffbef 100644 +index a2e350a0a835..01889ba0bf9b 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c -@@ -597,7 +597,7 @@ +@@ -570,7 +570,7 @@ // RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s // Z7_gdwarf: "-gcodeview" // Z7_gdwarf: "-debug-info-kind=constructor" @@ -55,35 +56,10 @@ index f332cd83b26e..911779fffbef 100644 // RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s // CXX11: -std=c++11 -diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c -index 753dee19fcbf..dfd12cc0bba4 100644 ---- a/clang/test/Driver/ve-toolchain.c -+++ b/clang/test/Driver/ve-toolchain.c -@@ -6,7 +6,7 @@ - /// Checking dwarf-version - - // RUN: %clang -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp -index 4b2b9c5747fe..3a196dd94ca1 100644 ---- a/clang/test/Driver/ve-toolchain.cpp -+++ b/clang/test/Driver/ve-toolchain.cpp -@@ -7,7 +7,7 @@ - - // RUN: %clangxx -### -g -target ve-unknown-linux-gnu \ - // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s --// DWARF_VER: "-dwarf-version=5" -+// DWARF_VER: "-dwarf-version=4" - - ///----------------------------------------------------------------------------- - /// Checking include-path -diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test/Driver/clang-g-opts.c ---- a/clang-14.0.0.src.orig/test/Driver/clang-g-opts.c 2022-03-14 10:44:55.000000000 +0100 -+++ b/clang-14.0.0.src/test/Driver/clang-g-opts.c 2022-04-13 06:36:55.832253890 +0200 +diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c +index d982b1070cae..bb129e75769c 100644 +--- a/clang/test/Driver/clang-g-opts.c ++++ b/clang/test/Driver/clang-g-opts.c @@ -32,7 +32,7 @@ // CHECK-WITHOUT-G-NOT: -debug-info-kind @@ -93,6 +69,32 @@ diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test // CHECK-WITH-G-DWARF2: "-dwarf-version=2" // CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone" +diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c +index 32e25769b6da..b8a2852daba8 100644 +--- a/clang/test/Driver/ve-toolchain.c ++++ b/clang/test/Driver/ve-toolchain.c +@@ -6,7 +6,7 @@ + /// Checking dwarf-version + + // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path +diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp +index 5a33d5eceb61..cedf895b36dc 100644 +--- a/clang/test/Driver/ve-toolchain.cpp ++++ b/clang/test/Driver/ve-toolchain.cpp +@@ -7,7 +7,7 @@ + + // RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \ + // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s +-// DWARF_VER: "-dwarf-version=5" ++// DWARF_VER: "-dwarf-version=4" + + ///----------------------------------------------------------------------------- + /// Checking include-path -- -2.35.1 +2.37.1 diff --git a/SOURCES/clang-14.0.6.src.tar.xz.sig b/SOURCES/clang-14.0.6.src.tar.xz.sig deleted file mode 100644 index 3f0ecf46aa55e58516013a18d5f7dc178d7e2915..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j*jP9iaCzek0rjBbvi$CRmtL7j>P0%Ep`O8^Q95TeJF zsfIzFir{|_|6`TJH^JQFJfE6LJRBT_3}|#(@J8kWWU}-2O8gToX3ac+$C$61gM8i$ zvHuFxRP*C9Ir9lG4`)H~k99n=~LI z4M3p1A`13BJKHCTUE&xGv#5&oQuJ7Wu{w4UODqO`{x*=9%v6~dc!{n1?VxmRp<#RE zoQuw4pHS@m;#{XF5Q~kDG4IfhWCee*QZq?189ohBhR@dnpPQ>?ikmrE4@FDQ3#n-k zC7~HrK!FH*x%7R#?BD^)QN6pqwOCz(j`lu`pe&gYpAa zsu7OsujiH#n|R*}jJHylpg8MsN$OR{@0bKidT?5@d3#4lg-wr4_06PkQM;;lf#%!% zQqyWuP<;}#L@`c$!{M~-oh<>47xv4W8d(o7puZ4E<#rf8H6^C-H`J|gog^fQzRXVB z!lV8{jOa~KpMw!fu-ggU*;ZD0llw$|^_-FkI{vicvIC5ifrx#PZB3>h2!J>Q0!t-$(=mrye=AqR@uLzr3S$o|l zF?xr}CSz*S|6*%DLA@BK!=ZwmIb2b>C$STt`Qbl91gt=I3p#Q ET)k2Y=>Px# diff --git a/SOURCES/clang-15.0.7.src.tar.xz.sig b/SOURCES/clang-15.0.7.src.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..4385f7a82d807c7556a33f30d951fa8a3314757c GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j*jP9iaCzek0rjBbvi$CRmtL7j>P0%O0rH2?|;5TeJF zsfIzFihUIi|7lVZf$PME^?x`~Y~eW=6!(6*DNXj?6g)cQm=J<%9zG^ zEvuoCrWa`=g_a)l7-yh4m)o3{(sVeqR+DPDgG@BQ8RHA#%`9WmdKp2$P%ZTI+;EB% zD)_A4=NP;cWs*?P58v=3yF=8W&r}5VeI#I!-t@pT@&IbnO%L}u?ET5y{y4VnP6m4J z(NAapC)#JHev3lWP`-AOr393CNXyeEoV)Z-%}VY6b9t(NZWRpH)7?CA^q^r?bEw4y zrsN5JO>vL`C+#t{@Kyk7X1OVl?PU$d2X_C`NyMAzt)#{IOtI;E@pJ-24I2l@aej24 zofmFByz2!Il)5Xo4o6PDNz*+N?xiYaN{`rYth5bWtH7ixtrGtj72GP0`>b*$W%I88 ztyd|?)Z2PBLJb4A{qU(JGNuQlYdKCWey&1TF?O>t6tNwovn_i$#ENW8YNq@6TCVdW zk;Z^j2>|wbF_2?l20GfjzW6pA4@HHivcB-?-x0J&f(MZ*(zzQU&_=XeV%Q< Ez4$s8F8}}l literal 0 HcmV?d00001 diff --git a/SOURCES/clang-tools-extra-14.0.6.src.tar.xz.sig b/SOURCES/clang-tools-extra-14.0.6.src.tar.xz.sig deleted file mode 100644 index 9559103dcc92507ad17dab9227017afeb5cb3427..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j*jP9iaCzek0rjBbvi$CRmtL7j>P0%Ep`WdI5Z5TeJF zsfIzFiYD_9{woolg%>@!f*q!0l2z)wWv1+ZbhrNVs8;I?Uro!ci9{*dKxFZ6&!R%s zRj&`92CNRm0Dy+nx@`C^n&X8eW@=?Fym_ll*bUTUT^@;sR_+=C0GAI^ZvA?ng9sWExRdr85nSq z!t;Nk%TqQ&L*xr{r|W)VoI0fKo6rs8)%g($!fRxI6l>z8qk39N(Xb}^5+I3Cq3M(H zJWcrfxQ5}&DW>>JAWgZZK2-Xk*eSn>j-WZPn{JIS@JAgysKOe*ywluJCUDTkAWu)p zEeY)KAze_wLapMqP97Yh6rQB|-#Qtf2U9GIoGnWxS5INvw|M$&{-WmSdA(NBn6A;| zZqFd>4cI*wul+_{t0o@ys?CjukLuzPLIS^Z-IDU1t{VaC$t{?@kmh>iCOmBbT_6w~ zphK{2Vr^U46)G)Ch zYMj6~%g)qdpnY73Tx%*@>Ms0nqeUNtkR$Lu4i%<+(^@S@kJF3nDs;2CEk E-~VqFP0%O0rKmZB}5TeJF zsfIzFiroSa{0hlM8@z&9iMc(9bzy1>f`~wBup zy38#B5>}Z=jJ$8;^CsnP_jR}55(@l^MR}<6VR$)?bOEsFA8aH~>(t5qY^n@#>1w+kbMrL_y+FLK=BhKwo6#7Ksj6^_zih)va++(!Ab?jjV2?qF!5Z8eWnHT ziwkkr=c!<2p6Q(ebI=#0w~ar)2$goJ<~N5(C#RnmnW-}0ALu;*a}v_4;`^=r*)@}s zSpI4dy(S3I@bjYG72~2=90`vLMCQVs=%WoN(yblm%ZI#+nRrDFI{2F>PBDfmrPUcy znxY)y?3|Uy{#)KY#w(s4OD&o*h7FUb#XGd&-MvpF7;wCeTnd$an-@Hgy(yH9JPu+% E*BOuu*Z=?k literal 0 HcmV?d00001 diff --git a/SOURCES/clangd-tests.patch b/SOURCES/clangd-tests.patch deleted file mode 100644 index eee0014..0000000 --- a/SOURCES/clangd-tests.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp -index 0c9455f..22638ee 100644 ---- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp -+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp -@@ -451,123 +451,6 @@ TEST_F(TUSchedulerTests, InvalidationUnchanged) { - EXPECT_EQ(1, Actions.load()) << "All actions should run"; - } - --TEST_F(TUSchedulerTests, ManyUpdates) { -- const int FilesCount = 3; -- const int UpdatesPerFile = 10; -- -- std::mutex Mut; -- int TotalASTReads = 0; -- int TotalPreambleReads = 0; -- int TotalUpdates = 0; -- llvm::StringMap LatestDiagVersion; -- -- // Run TUScheduler and collect some stats. -- { -- auto Opts = optsForTest(); -- Opts.UpdateDebounce = DebouncePolicy::fixed(std::chrono::milliseconds(50)); -- TUScheduler S(CDB, Opts, captureDiags()); -- -- std::vector Files; -- for (int I = 0; I < FilesCount; ++I) { -- std::string Name = "foo" + std::to_string(I) + ".cpp"; -- Files.push_back(testPath(Name)); -- this->FS.Files[Files.back()] = ""; -- } -- -- StringRef Contents1 = R"cpp(int a;)cpp"; -- StringRef Contents2 = R"cpp(int main() { return 1; })cpp"; -- StringRef Contents3 = R"cpp(int a; int b; int sum() { return a + b; })cpp"; -- -- StringRef AllContents[] = {Contents1, Contents2, Contents3}; -- const int AllContentsSize = 3; -- -- // Scheduler may run tasks asynchronously, but should propagate the -- // context. We stash a nonce in the context, and verify it in the task. -- static Key NonceKey; -- int Nonce = 0; -- -- for (int FileI = 0; FileI < FilesCount; ++FileI) { -- for (int UpdateI = 0; UpdateI < UpdatesPerFile; ++UpdateI) { -- auto Contents = AllContents[(FileI + UpdateI) % AllContentsSize]; -- -- auto File = Files[FileI]; -- auto Inputs = getInputs(File, Contents.str()); -- { -- WithContextValue WithNonce(NonceKey, ++Nonce); -- Inputs.Version = std::to_string(UpdateI); -- updateWithDiags( -- S, File, Inputs, WantDiagnostics::Auto, -- [File, Nonce, Version(Inputs.Version), &Mut, &TotalUpdates, -- &LatestDiagVersion](std::vector) { -- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce)); -- EXPECT_EQ(File, boundPath()); -- -- std::lock_guard Lock(Mut); -- ++TotalUpdates; -- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext()); -- // Make sure Diags are for a newer version. -- auto It = LatestDiagVersion.try_emplace(File, -1); -- const int PrevVersion = It.first->second; -- int CurVersion; -- ASSERT_TRUE(llvm::to_integer(Version, CurVersion, 10)); -- EXPECT_LT(PrevVersion, CurVersion); -- It.first->getValue() = CurVersion; -- }); -- } -- { -- WithContextValue WithNonce(NonceKey, ++Nonce); -- S.runWithAST( -- "CheckAST", File, -- [File, Inputs, Nonce, &Mut, -- &TotalASTReads](Expected AST) { -- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce)); -- EXPECT_EQ(File, boundPath()); -- -- ASSERT_TRUE((bool)AST); -- EXPECT_EQ(AST->Inputs.Contents, Inputs.Contents); -- EXPECT_EQ(AST->Inputs.Version, Inputs.Version); -- EXPECT_EQ(AST->AST.version(), Inputs.Version); -- -- std::lock_guard Lock(Mut); -- ++TotalASTReads; -- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext()); -- }); -- } -- -- { -- WithContextValue WithNonce(NonceKey, ++Nonce); -- S.runWithPreamble( -- "CheckPreamble", File, TUScheduler::Stale, -- [File, Inputs, Nonce, &Mut, -- &TotalPreambleReads](Expected Preamble) { -- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce)); -- EXPECT_EQ(File, boundPath()); -- -- ASSERT_TRUE((bool)Preamble); -- EXPECT_EQ(Preamble->Contents, Inputs.Contents); -- -- std::lock_guard Lock(Mut); -- ++TotalPreambleReads; -- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext()); -- }); -- } -- } -- } -- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10))); -- } // TUScheduler destructor waits for all operations to finish. -- -- std::lock_guard Lock(Mut); -- // Updates might get coalesced in preamble thread and result in dropping -- // diagnostics for intermediate snapshots. -- EXPECT_GE(TotalUpdates, FilesCount); -- EXPECT_LE(TotalUpdates, FilesCount * UpdatesPerFile); -- // We should receive diags for last update. -- for (const auto &Entry : LatestDiagVersion) -- EXPECT_EQ(Entry.second, UpdatesPerFile - 1); -- EXPECT_EQ(TotalASTReads, FilesCount * UpdatesPerFile); -- EXPECT_EQ(TotalPreambleReads, FilesCount * UpdatesPerFile); --} -- - TEST_F(TUSchedulerTests, EvictedAST) { - std::atomic BuiltASTCounter(0); - auto Opts = optsForTest(); diff --git a/SOURCES/llvm-hello.patch b/SOURCES/llvm-hello.patch deleted file mode 100644 index d28e349..0000000 --- a/SOURCES/llvm-hello.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp 2022-03-07 08:52:20.009112976 +0100 -@@ -1,4 +1,4 @@ --// REQUIRES: plugins -+// REQUIRES: plugins, llvm-hello - // RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s - // CHECK-LIST: Enabled checks: - // CHECK-LIST-NEXT: mytest1 -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt 2022-03-07 10:58:56.172490672 +0100 -@@ -15,10 +15,15 @@ - - string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) - -+if (TARGET LLVMHello) -+ set (LLVM_HAS_LLVM_HELLO 1) -+endif() -+ - llvm_canonicalize_cmake_booleans( - CLANG_TIDY_ENABLE_STATIC_ANALYZER - CLANG_PLUGIN_SUPPORT - LLVM_INSTALL_TOOLCHAIN_ONLY -+ LLVM_HAS_LLVM_HELLO - ) - - configure_lit_site_cfg( -@@ -97,7 +102,10 @@ - endif() - - if(TARGET CTTestTidyModule) -- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) -+ if (TARGET LLVMHello) -+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) # Should be LLVMHello? -+ endif() - target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}") - if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN)) - set(LLVM_LINK_COMPONENTS -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py 2022-03-07 08:52:20.010112983 +0100 -@@ -155,3 +155,6 @@ - # Plugins (loadable modules) - if config.has_plugins and config.llvm_plugin_ext: - config.available_features.add('plugins') -+ -+if config.has_llvm_hello: -+ config.available_features.add('llvm-hello') -diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in ---- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in 2022-03-02 01:46:37.000000000 +0100 -+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in 2022-03-07 10:59:17.202663983 +0100 -@@ -13,6 +13,7 @@ - config.target_triple = "@TARGET_TRIPLE@" - config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@ - config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@ -+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@ - - # Support substitution of the tools and libs dirs with user parameters. This is - # used when we can't determine the tool dir at configuration time. diff --git a/SOURCES/remove-test.patch b/SOURCES/remove-test.patch deleted file mode 100644 index ba43de9..0000000 --- a/SOURCES/remove-test.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -index 253f78eb36ea..1199da3e4cfd 100644 ---- a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -+++ b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt -@@ -30,7 +30,6 @@ add_extra_unittest(ClangTidyTests - OptionsProviderTest.cpp - OverlappingReplacementsTest.cpp - UsingInserterTest.cpp -- ReadabilityModuleTest.cpp - TransformerClangTidyCheckTest.cpp - ) - -@@ -54,7 +53,6 @@ target_link_libraries(ClangTidyTests - clangTidyGoogleModule - clangTidyLLVMModule - clangTidyObjCModule -- clangTidyReadabilityModule - clangTidyUtils - LLVMTestingSupport - ) diff --git a/SPECS/clang.spec b/SPECS/clang.spec index 2820e6c..a8ed82a 100644 --- a/SPECS/clang.spec +++ b/SPECS/clang.spec @@ -1,9 +1,9 @@ %bcond_with compat_build %bcond_without check -%global maj_ver 14 +%global maj_ver 15 %global min_ver 0 -%global patch_ver 6 +%global patch_ver 7 #global rc_ver 4 %global clang_version %{maj_ver}.%{min_ver}.%{patch_ver} @@ -52,7 +52,7 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif -Source4: tstellar-gpg-key.asc +Source4: release-keys.asc %if !0%{?compat_build} Source5: macros.%{name} %endif @@ -71,9 +71,7 @@ Patch8: disable-recommonmark.patch # Patches for clang-tools-extra %if %{without compat_build} -Patch201: clangd-tests.patch -Patch202: llvm-hello.patch -Patch203: remove-test.patch +Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch %endif BuildRequires: gcc @@ -256,14 +254,8 @@ Requires: python3 %setup -T -q -b 1 -n %{clang_tools_srcdir} %autopatch -m200 -p2 - -# This test is broken upstream. It is a clang-tidy unittest -# that includes a file from clang, breaking standalone builds. -# https://github.com/llvm/llvm-project/issues/54116 -rm unittests/clang-tidy/ReadabilityModuleTest.cpp - # failing test case -rm test/clang-tidy/checkers/altera-struct-pack-align.cpp +rm test/clang-tidy/checkers/altera/struct-pack-align.cpp %py3_shebang_fix \ clang-tidy/tool/run-clang-tidy.py \ @@ -327,7 +319,9 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized" # -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed: # https://reviews.llvm.org/D107628 +# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC. %cmake .. -G Ninja \ + -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ -DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -484,7 +478,7 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format %if %{with check} # requires lit.py from LLVM utilities # FIXME: Fix failing ARM tests -LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_builddir} || \ +LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} %{_smp_mflags} check-all -C %{_vpath_builddir} || \ %ifarch %{arm} : %else @@ -572,9 +566,11 @@ false %{_bindir}/clang-include-fixer %{_bindir}/clang-move %{_bindir}/clang-offload-bundler +%{_bindir}/clang-offload-packager %{_bindir}/clang-offload-wrapper %{_bindir}/clang-linker-wrapper %{_bindir}/clang-nvlink-wrapper +%{_bindir}/clang-pseudo %{_bindir}/clang-query %{_bindir}/clang-refactor %{_bindir}/clang-rename @@ -611,6 +607,12 @@ false %endif %changelog +* Thu Jan 19 2023 Tom Stellard - 15.0.7-1 +- Update to LLVM 15.0.7 + +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + * Tue Jun 28 2022 Tom Stellard - 14.0.6-1 - 14.0.6 Release