From 8756297fcc66488f4babc71f0b7806e0abb98c9d Mon Sep 17 00:00:00 2001 From: luffyluo Date: Mon, 18 Dec 2023 10:54:41 +0800 Subject: [PATCH] Upgrade to version 17.0.6 --- ...error-messages-for-unsupported-reloc.patch | 184 --------------- ...-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch | 39 ---- 0001-llvm-Add-install-targets-for-gtest.patch | 32 --- ...-party-Add-install-targets-for-gtest.patch | 47 ---- ...e-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch | 218 ------------------ llvm.spec | 20 +- sources | 6 +- 7 files changed, 8 insertions(+), 538 deletions(-) delete mode 100644 0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch delete mode 100644 0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch delete mode 100644 0001-llvm-Add-install-targets-for-gtest.patch delete mode 100644 0201-third-party-Add-install-targets-for-gtest.patch delete mode 100644 Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch diff --git a/0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch b/0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch deleted file mode 100644 index 34128b6..0000000 --- a/0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch +++ /dev/null @@ -1,184 +0,0 @@ -From efbaf8bc61f4c0e29a3eaafb11ac0ddda8bd3dff Mon Sep 17 00:00:00 2001 -From: Ulrich Weigand -Date: Fri, 30 Jun 2023 16:02:56 +0200 -Subject: [PATCH] [SystemZ] Improve error messages for unsupported relocations - -In the SystemZMCObjectWriter, we currently just abort in case -some unsupported relocation in requested. However, as this -situation can be triggered by invalid (inline) assembler input, -we should really get a regular error message instead. ---- - .../MCTargetDesc/SystemZMCObjectWriter.cpp | 59 +++++++++++-------- - 1 file changed, 35 insertions(+), 24 deletions(-) - -diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp -index c23463ab9bde..0b11468afc52 100644 ---- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp -+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp -@@ -9,6 +9,7 @@ - #include "MCTargetDesc/SystemZMCFixups.h" - #include "MCTargetDesc/SystemZMCTargetDesc.h" - #include "llvm/BinaryFormat/ELF.h" -+#include "llvm/MC/MCContext.h" - #include "llvm/MC/MCELFObjectWriter.h" - #include "llvm/MC/MCExpr.h" - #include "llvm/MC/MCFixup.h" -@@ -40,7 +41,7 @@ SystemZObjectWriter::SystemZObjectWriter(uint8_t OSABI) - /*HasRelocationAddend_=*/ true) {} - - // Return the relocation type for an absolute value of MCFixupKind Kind. --static unsigned getAbsoluteReloc(unsigned Kind) { -+static unsigned getAbsoluteReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_1: return ELF::R_390_8; - case FK_Data_2: return ELF::R_390_16; -@@ -49,11 +50,12 @@ static unsigned getAbsoluteReloc(unsigned Kind) { - case SystemZ::FK_390_12: return ELF::R_390_12; - case SystemZ::FK_390_20: return ELF::R_390_20; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported absolute address"); -+ return 0; - } - - // Return the relocation type for a PC-relative value of MCFixupKind Kind. --static unsigned getPCRelReloc(unsigned Kind) { -+static unsigned getPCRelReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_2: return ELF::R_390_PC16; - case FK_Data_4: return ELF::R_390_PC32; -@@ -63,62 +65,69 @@ static unsigned getPCRelReloc(unsigned Kind) { - case SystemZ::FK_390_PC24DBL: return ELF::R_390_PC24DBL; - case SystemZ::FK_390_PC32DBL: return ELF::R_390_PC32DBL; - } -- llvm_unreachable("Unsupported PC-relative address"); -+ Ctx.reportError(Loc, "Unsupported PC-relative address"); -+ return 0; - } - - // Return the R_390_TLS_LE* relocation type for MCFixupKind Kind. --static unsigned getTLSLEReloc(unsigned Kind) { -+static unsigned getTLSLEReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_4: return ELF::R_390_TLS_LE32; - case FK_Data_8: return ELF::R_390_TLS_LE64; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported thread-local address (local-exec)"); -+ return 0; - } - - // Return the R_390_TLS_LDO* relocation type for MCFixupKind Kind. --static unsigned getTLSLDOReloc(unsigned Kind) { -+static unsigned getTLSLDOReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_4: return ELF::R_390_TLS_LDO32; - case FK_Data_8: return ELF::R_390_TLS_LDO64; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported thread-local address (local-dynamic)"); -+ return 0; - } - - // Return the R_390_TLS_LDM* relocation type for MCFixupKind Kind. --static unsigned getTLSLDMReloc(unsigned Kind) { -+static unsigned getTLSLDMReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_4: return ELF::R_390_TLS_LDM32; - case FK_Data_8: return ELF::R_390_TLS_LDM64; - case SystemZ::FK_390_TLS_CALL: return ELF::R_390_TLS_LDCALL; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported thread-local address (local-dynamic)"); -+ return 0; - } - - // Return the R_390_TLS_GD* relocation type for MCFixupKind Kind. --static unsigned getTLSGDReloc(unsigned Kind) { -+static unsigned getTLSGDReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case FK_Data_4: return ELF::R_390_TLS_GD32; - case FK_Data_8: return ELF::R_390_TLS_GD64; - case SystemZ::FK_390_TLS_CALL: return ELF::R_390_TLS_GDCALL; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported thread-local address (general-dynamic)"); -+ return 0; - } - - // Return the PLT relocation counterpart of MCFixupKind Kind. --static unsigned getPLTReloc(unsigned Kind) { -+static unsigned getPLTReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind) { - switch (Kind) { - case SystemZ::FK_390_PC12DBL: return ELF::R_390_PLT12DBL; - case SystemZ::FK_390_PC16DBL: return ELF::R_390_PLT16DBL; - case SystemZ::FK_390_PC24DBL: return ELF::R_390_PLT24DBL; - case SystemZ::FK_390_PC32DBL: return ELF::R_390_PLT32DBL; - } -- llvm_unreachable("Unsupported absolute address"); -+ Ctx.reportError(Loc, "Unsupported PC-relative PLT address"); -+ return 0; - } - - unsigned SystemZObjectWriter::getRelocType(MCContext &Ctx, - const MCValue &Target, - const MCFixup &Fixup, - bool IsPCRel) const { -+ SMLoc Loc = Fixup.getLoc(); - unsigned Kind = Fixup.getKind(); - if (Kind >= FirstLiteralRelocationKind) - return Kind - FirstLiteralRelocationKind; -@@ -126,38 +135,40 @@ unsigned SystemZObjectWriter::getRelocType(MCContext &Ctx, - switch (Modifier) { - case MCSymbolRefExpr::VK_None: - if (IsPCRel) -- return getPCRelReloc(Kind); -- return getAbsoluteReloc(Kind); -+ return getPCRelReloc(Ctx, Loc, Kind); -+ return getAbsoluteReloc(Ctx, Loc, Kind); - - case MCSymbolRefExpr::VK_NTPOFF: - assert(!IsPCRel && "NTPOFF shouldn't be PC-relative"); -- return getTLSLEReloc(Kind); -+ return getTLSLEReloc(Ctx, Loc, Kind); - - case MCSymbolRefExpr::VK_INDNTPOFF: - if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL) - return ELF::R_390_TLS_IEENT; -- llvm_unreachable("Only PC-relative INDNTPOFF accesses are supported for now"); -+ Ctx.reportError(Loc, "Only PC-relative INDNTPOFF accesses are supported for now"); -+ return 0; - - case MCSymbolRefExpr::VK_DTPOFF: - assert(!IsPCRel && "DTPOFF shouldn't be PC-relative"); -- return getTLSLDOReloc(Kind); -+ return getTLSLDOReloc(Ctx, Loc, Kind); - - case MCSymbolRefExpr::VK_TLSLDM: - assert(!IsPCRel && "TLSLDM shouldn't be PC-relative"); -- return getTLSLDMReloc(Kind); -+ return getTLSLDMReloc(Ctx, Loc, Kind); - - case MCSymbolRefExpr::VK_TLSGD: - assert(!IsPCRel && "TLSGD shouldn't be PC-relative"); -- return getTLSGDReloc(Kind); -+ return getTLSGDReloc(Ctx, Loc, Kind); - - case MCSymbolRefExpr::VK_GOT: - if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL) - return ELF::R_390_GOTENT; -- llvm_unreachable("Only PC-relative GOT accesses are supported for now"); -+ Ctx.reportError(Loc, "Only PC-relative GOT accesses are supported for now"); -+ return 0; - - case MCSymbolRefExpr::VK_PLT: -- assert(IsPCRel && "@PLT shouldt be PC-relative"); -- return getPLTReloc(Kind); -+ assert(IsPCRel && "@PLT shouldn't be PC-relative"); -+ return getPLTReloc(Ctx, Loc, Kind); - - default: - llvm_unreachable("Modifier not supported"); --- -2.41.0 - diff --git a/0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch b/0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch deleted file mode 100644 index 192ca92..0000000 --- a/0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cf35b4622d31701d0c79e0441931518726f997f2 Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Fri, 30 Jun 2023 12:25:09 +0200 -Subject: [PATCH] Add LLVM_UNITTEST_LINK_FLAGS option - -This allows specifying linker flags that should only be applied -to unit tests, e.g. to disable LTO optimization for them. ---- - llvm/cmake/modules/AddLLVM.cmake | 2 ++ - llvm/cmake/modules/HandleLLVMOptions.cmake | 3 +++ - 2 files changed, 5 insertions(+) - -diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake -index 94fc83db9344..7cf75223ce38 100644 ---- a/llvm/cmake/modules/AddLLVM.cmake -+++ b/llvm/cmake/modules/AddLLVM.cmake -@@ -1592,6 +1592,8 @@ function(add_unittest test_suite test_name) - endif() - endif() - -+ target_link_options(${test_name} PRIVATE "${LLVM_UNITTEST_LINK_FLAGS}") -+ - set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}) - set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir}) - # libpthreads overrides some standard library symbols, so main -diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake -index 6119ecdce0f4..eec98162c2d7 100644 ---- a/llvm/cmake/modules/HandleLLVMOptions.cmake -+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake -@@ -1274,3 +1274,6 @@ endif() - - set(LLVM_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE STRING - "Directory containing third party software used by LLVM (e.g. googletest)") -+ -+set(LLVM_UNITTEST_LINK_FLAGS "" CACHE STRING -+ "Additional linker flags for unit tests") --- -2.40.1 - diff --git a/0001-llvm-Add-install-targets-for-gtest.patch b/0001-llvm-Add-install-targets-for-gtest.patch deleted file mode 100644 index e84c444..0000000 --- a/0001-llvm-Add-install-targets-for-gtest.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 17 Nov 2022 09:01:10 +0000 -Subject: Add install targets for gtest - -Stand-alone builds need an installed version of gtest in order to run -the unittests. - -Differential Revision: https://reviews.llvm.org/D137890 ---- - llvm/CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt -index 60e1f29620af..d91338532815 100644 ---- a/llvm/CMakeLists.txt -+++ b/llvm/CMakeLists.txt -@@ -693,6 +693,11 @@ option(LLVM_BUILD_TESTS - "Build LLVM unit tests. If OFF, just generate build targets." OFF) - option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) - -+option(LLVM_INSTALL_GTEST -+ "Install the llvm gtest library. This should be on if you want to do -+ stand-alone builds of the other projects and run their unit tests." OFF) -+ -+ - option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default - targets. If OFF, benchmarks still could be built using Benchmarks target." OFF) - option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON) --- -2.34.3 - diff --git a/0201-third-party-Add-install-targets-for-gtest.patch b/0201-third-party-Add-install-targets-for-gtest.patch deleted file mode 100644 index 5c86130..0000000 --- a/0201-third-party-Add-install-targets-for-gtest.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8cc3870f09d728d9017c72eba9520117a4283fee Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 17 Nov 2022 09:01:10 +0000 -Subject: Add install targets for gtest - -Stand-alone builds need an installed version of gtest in order to run -the unittests. - -Differential Revision: https://reviews.llvm.org/D137890 ---- - third-party/unittest/CMakeLists.txt | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/third-party/unittest/CMakeLists.txt b/third-party/unittest/CMakeLists.txt -index 0e54e0e57c35..1d2a52730d7d 100644 ---- a/third-party/unittest/CMakeLists.txt -+++ b/third-party/unittest/CMakeLists.txt -@@ -65,12 +65,25 @@ if (NOT LLVM_ENABLE_THREADS) - endif () - - target_include_directories(llvm_gtest -- PUBLIC googletest/include googlemock/include -+ PUBLIC $ -+ $ -+ $ -+ $ - PRIVATE googletest googlemock - ) - - add_subdirectory(UnitTestMain) - -+if (LLVM_INSTALL_GTEST) -+export(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport FILE LLVMGTestConfig.cmake) -+install(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport EXPORT LLVMGTestConfig -+ ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest) -+ install(EXPORT LLVMGTestConfig DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} COMPONENT llvm_gtest) -+ add_llvm_install_targets(install-llvm_gtest COMPONENT llvm_gtest DEPENDS llvm_gtest LLVMGTestConfig.cmake) -+ install(DIRECTORY googletest/include/gtest/ DESTINATION include/llvm-gtest/gtest/ COMPONENT llvm_gtest) -+ install(DIRECTORY googlemock/include/gmock/ DESTINATION include/llvm-gmock/gmock/ COMPONENT llvm_gtest) -+endif() -+ - # When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface - # link libraries for gtest and gtest_main. This means that any target, like - # unittests for example, that links against gtest will be forced to link --- -2.34.3 - diff --git a/Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch b/Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch deleted file mode 100644 index 661c03e..0000000 --- a/Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch +++ /dev/null @@ -1,218 +0,0 @@ -diff -Nuar llvm-16.0.6.src/unittests/Analysis/ValueTrackingTest.cpp llvm-16.0.6.src-new/unittests/Analysis/ValueTrackingTest.cpp ---- llvm-16.0.6.src/unittests/Analysis/ValueTrackingTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/Analysis/ValueTrackingTest.cpp 2023-01-05 21:05:15.794281130 +0800 -@@ -1964,6 +1964,7 @@ - }, - }; - -+#if 0 - INSTANTIATE_TEST_SUITE_P(IsBytewiseValueParamTests, IsBytewiseValueTest, - ::testing::ValuesIn(IsBytewiseValueTests)); - -@@ -1977,6 +1978,7 @@ - S << *Actual; - EXPECT_EQ(GetParam().first, S.str()); - } -+#endif - - TEST_F(ValueTrackingTest, ComputeConstantRange) { - { -@@ -2331,5 +2333,8 @@ - EXPECT_EQ(!!AI, GetParam().ZeroOffsetResult); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P(FindAllocaForValueTest, FindAllocaForValueTest, - ::testing::ValuesIn(FindAllocaForValueTests)); -+#endif -+ -diff -Nuar llvm-16.0.6.src/unittests/CodeGen/DIETest.cpp llvm-16.0.6.src-new/unittests/CodeGen/DIETest.cpp ---- llvm-16.0.6.src/unittests/CodeGen/DIETest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/CodeGen/DIETest.cpp 2023-01-05 21:43:00.894659613 +0800 -@@ -64,6 +64,7 @@ - Tst.emitValue(TestPrinter->getAP(), Form); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P( - DIETestParams, DIEExprFixture, - testing::Values( -@@ -171,5 +172,5 @@ - DIETestParams{4, dwarf::DWARF64, dwarf::DW_FORM_loclistx, 2u}, - DIETestParams{4, dwarf::DWARF64, dwarf::DW_FORM_data8, 8u}, - DIETestParams{4, dwarf::DWARF64, dwarf::DW_FORM_sec_offset, 8u})); -- -+#endif - } // end namespace -diff -Nuar llvm-16.0.6.src/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp llvm-16.0.6.src-new/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp ---- llvm-16.0.6.src/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp 2023-01-05 22:53:19.184800856 +0800 -@@ -379,6 +379,7 @@ - std::to_string(Version))); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P(UnsupportedVersionTestParams, - DebugLineUnsupportedVersionFixture, - Values(/*1 below min */ 1, /* 1 above max */ 6, -@@ -1917,5 +1918,6 @@ - Result)); - EXPECT_THAT(Result.c_str(), MatchesRegex("a dir.b dir.b file")); - } -+#endif - - } // end anonymous namespace -diff -Nuar llvm-16.0.6.src/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp llvm-16.0.6.src-new/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp ---- llvm-16.0.6.src/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp 2023-01-06 08:56:56.406882999 +0800 -@@ -186,7 +186,7 @@ - struct FormSkipValueFixture2 : FormSkipValueFixtureBase {}; - TEST_P(FormSkipValueFixture1, skipValuePart1) { doSkipValueTest(); } - TEST_P(FormSkipValueFixture2, skipValuePart2) { doSkipValueTest(); } -- -+#if 0 - INSTANTIATE_TEST_SUITE_P( - SkipValueTestParams1, FormSkipValueFixture1, - testing::Values( -@@ -392,5 +392,6 @@ - DWARF32, "0x00112233"}, - DumpValueParams{DW_FORM_sec_offset, DumpTestSample64, - DWARF64, "0x0011223344556677"})); -+#endif - - } // end anonymous namespace -diff -Nuar llvm-16.0.6.src/unittests/Demangle/DLangDemangleTest.cpp llvm-16.0.6.src-new/unittests/Demangle/DLangDemangleTest.cpp ---- llvm-16.0.6.src/unittests/Demangle/DLangDemangleTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/Demangle/DLangDemangleTest.cpp 2023-01-06 08:55:40.010196291 +0800 -@@ -26,6 +26,7 @@ - EXPECT_STREQ(Demangled, GetParam().second); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P( - DLangDemangleTest, DLangDemangleTestFixture, - testing::Values( -@@ -73,3 +74,4 @@ - nullptr), // invalid type back reference position. - std::make_pair("_D8demangle5recurQa", - nullptr))); // invalid type back reference (recursive). -+#endif -diff -Nuar llvm-16.0.6.src/unittests/FileCheck/FileCheckTest.cpp llvm-16.0.6.src-new/unittests/FileCheck/FileCheckTest.cpp ---- llvm-16.0.6.src/unittests/FileCheck/FileCheckTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/FileCheck/FileCheckTest.cpp 2023-01-06 08:58:47.331880016 +0800 -@@ -330,6 +330,7 @@ - EXPECT_TRUE(bool(Format)); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P( - AllowedExplicitExpressionFormat, ExpressionFormatParameterisedFixture, - ::testing::Values( -@@ -393,6 +394,7 @@ - EXPECT_TRUE(NoFormat == ExpressionFormat::Kind::NoFormat); - EXPECT_FALSE(NoFormat != ExpressionFormat::Kind::NoFormat); - } -+#endif - - template - static Expected doValueOperation(binop_eval_t Operation, -diff -Nuar llvm-16.0.6.src/unittests/Frontend/OpenMPIRBuilderTest.cpp llvm-16.0.6.src-new/unittests/Frontend/OpenMPIRBuilderTest.cpp ---- llvm-16.0.6.src/unittests/Frontend/OpenMPIRBuilderTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/Frontend/OpenMPIRBuilderTest.cpp 2023-01-06 08:54:45.937710269 +0800 -@@ -2050,7 +2050,7 @@ - OMPBuilder.finalize(); - EXPECT_FALSE(verifyModule(*M, &errs())); - } -- -+#if 0 - INSTANTIATE_TEST_SUITE_P( - OpenMPWSLoopSchedulingTypes, OpenMPIRBuilderTestWithParams, - ::testing::Values(omp::OMPScheduleType::UnorderedDynamicChunked, -@@ -5506,4 +5506,5 @@ - GlobalValue::WeakAnyLinkage); - EXPECT_TRUE(InfoManager.hasDeviceGlobalVarEntryInfo("gvar")); - } -+#endif - } // namespace -diff -Nuar llvm-16.0.6.src/unittests/ProfileData/CoverageMappingTest.cpp llvm-16.0.6.src-new/unittests/ProfileData/CoverageMappingTest.cpp ---- llvm-16.0.6.src/unittests/ProfileData/CoverageMappingTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/ProfileData/CoverageMappingTest.cpp 2023-01-06 09:04:53.615172318 +0800 -@@ -920,6 +920,7 @@ - ASSERT_EQ(3U, NumFuncs); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P(ParameterizedCovMapTest, CoverageMappingTest, - ::testing::Combine(::testing::Bool(), - ::testing::Bool())); -@@ -973,5 +974,6 @@ - } - } - } -+#endif - - } // end anonymous namespace -diff -Nuar llvm-16.0.6.src/unittests/ProfileData/InstrProfTest.cpp llvm-16.0.6.src-new/unittests/ProfileData/InstrProfTest.cpp ---- llvm-16.0.6.src/unittests/ProfileData/InstrProfTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/ProfileData/InstrProfTest.cpp 2023-01-06 09:04:15.098826114 +0800 -@@ -1040,9 +1040,10 @@ - auto I = Reader->begin(), E = Reader->end(); - ASSERT_TRUE(I == E); - } -- -+#if 0 - INSTANTIATE_TEST_SUITE_P(MaybeSparse, MaybeSparseInstrProfTest, - ::testing::Bool()); -+#endif - - #if defined(_LP64) && defined(EXPENSIVE_CHECKS) - TEST(ProfileReaderTest, ReadsLargeFiles) { -diff -Nuar llvm-16.0.6.src/unittests/Support/MemoryTest.cpp llvm-16.0.6.src-new/unittests/Support/MemoryTest.cpp ---- llvm-16.0.6.src/unittests/Support/MemoryTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/Support/MemoryTest.cpp 2023-01-06 08:59:21.828190091 +0800 -@@ -427,8 +427,9 @@ - Memory::MF_READ|Memory::MF_EXEC, - Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC - }; -- -+#if 0 - INSTANTIATE_TEST_SUITE_P(AllocationTests, MappedMemoryTest, - ::testing::ValuesIn(MemoryFlags)); -+#endif - - } // anonymous namespace - diff -Nuar llvm-16.0.6.src/unittests/TargetParser/TargetParserTest.cpp llvm-16.0.6.src-new/unittests/TargetParser/TargetParserTest.cpp ---- llvm-16.0.6.src/unittests/TargetParser/TargetParserTest.cpp 2022-06-10 22:47:36.000000000 +0800 -+++ llvm-16.0.6.src-new/unittests/TargetParser/TargetParserTest.cpp 2023-01-06 09:44:14.688482267 +0800 -@@ -116,7 +116,7 @@ - - EXPECT_EQ(params.CPUAttr, ARM::getCPUAttr(AK)); - } -- -+#if 0 - // Note that we include ARM::AEK_NONE even when there are other extensions - // we expect. This is because the default extensions for a CPU are the sum - // of the default extensions for its architecture and for the CPU. -@@ -547,6 +547,7 @@ - testARMArch("armv7k", "generic", "v7k", - ARMBuildAttrs::CPUArch::v7)); - } -+#endif - - bool testARMExtension(StringRef CPUName,ARM::ArchKind ArchKind, StringRef ArchExt) { - return ARM::getDefaultExtensions(CPUName, ArchKind) & -@@ -971,6 +972,7 @@ - params.ExpectedFlags, default_extensions); - } - -+#if 0 - INSTANTIATE_TEST_SUITE_P( - AArch64CPUTests, AArch64CPUTestFixture, - ::testing::Values( -@@ -1555,5 +1556,5 @@ - AArch64::getArchExtFeature(ArchExt[i][1])); - } - } -- -+#endif - } // namespace diff --git a/llvm.spec b/llvm.spec index 70a3eb0..dd2dee7 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,8 +1,8 @@ %global toolchain clang Name: llvm -Version: 16.0.6 -Release: 2%{?dist} +Version: 17.0.6 +Release: 1%{?dist} Summary: Low Level Virtual Machine, modular and reusable compiler and toolchain License: Apache License v2.0 with LLVM Exceptions URL: http://llvm.org @@ -10,12 +10,6 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/third-party-%{version}.src.tar.xz -Patch0001: 0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch -Patch0002: 0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch -Patch3001: 0001-llvm-Add-install-targets-for-gtest.patch -Patch3002: 0201-third-party-Add-install-targets-for-gtest.patch -Patch5000: Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch - %define maj_ver %(echo %{version} | cut -d. -f1) %define min_ver %(echo %{version} | cut -d. -f2) %define patch_ver %(echo %{version} | cut -d. -f3) @@ -87,17 +81,10 @@ cd .. mv cmake-%{version}.src cmake %setup -T -q -b 2 -n third-party-%{version}.src -%patch3002 -p2 cd .. mv third-party-%{version}.src third-party %setup -T -q -b 0 -n llvm-%{version}.src -%patch0001 -p2 -%patch0002 -p2 -%patch3001 -p2 -%ifarch aarch64 -%patch5000 -p1 -%endif pathfix.py -i %{__python3} -p -n -k -as \ test/BugPoint/compile-custom.ll.py \ @@ -242,6 +229,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_buildd %{_includedir}/llvm-gmock %changelog +* Mon Dec 18 2023 luffyluo - 17.0.6-1 +- Upgrade to version 17.0.6 + * Fri Sep 08 2023 OpenCloudOS Release Engineering - 16.0.6-2 - Rebuilt for OpenCloudOS Stream 23.09 diff --git a/sources b/sources index d19ab72..38802c5 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (llvm-16.0.6.src.tar.xz) = 8d4cdadc9a1ad249fbf9248c8e56f3bcafab73a473a0b0ca73499ed8825c62e27668aac4f1d03341631e5ad93701621e834e9e196ca32eac3ef805cf1c860083 -SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b -SHA512 (third-party-16.0.6.src.tar.xz) = 51683e92953eb57ed36ebc8a43cb688863edf4f24ba71965d57016cfdc17bad10f8f3942e9597a729329f89489597e79bb4653445ff1ec36ec03077adb1dd7b9 +SHA512 (llvm-17.0.6.src.tar.xz) = bf9b04d0d45c67168b195c550cd8326e3a01176f92776705846aad3956a494bcb7a053b0b0bde19abd68dc0068e5c97ef99dee7eadfdb727bc0d758b2684f3bd +SHA512 (cmake-17.0.6.src.tar.xz) = b2c5e404ca36542d44e1a7f2801bbcecbcf5f1e8c63b793bb2308228483406bdfe002720aadb913c0228cd2bbe5998465eaadc4a49fad6a5eb6ff907fa5fd45a +SHA512 (third-party-17.0.6.src.tar.xz) = 242dada4800c5e558f5f243e6aa0905d90ca3f82cc81baf14c60de543a7e737d4c2f3471122f2c641dc4f0724e4ebf5cf137761a231b34aab2a12f1cfc902c53 -- Gitee