[llvm] Update to 18.1.6 (#37599)

Fixes #37189
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
This commit is contained in:
Yury Bura 2024-06-06 01:14:30 -07:00 committed by GitHub
parent 0f7284c035
commit 63d9dcdd7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 1788 additions and 420 deletions

View File

@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO halide/Halide REPO halide/Halide
REF "v${VERSION}" REF 8864e8ac1c0bb460f0034e9c46f7f944afad3a19 # unreleased version with LLVM 18 support
SHA512 fd94b35d0af2bbb4e932c6be5204c8a4bf011a9c62bcfc2115d263b269438bb5858627492c108c17140ccf872317f072619b59b6f583fed1bec001af53b8c0e2 SHA512 286cbef25b5cc0f5095cbc80a2fd1cacf369948c58c14406ac6bcc28a7a37c81417d601975083f03670e22276a1886b8801bdc91aa6fe80049a276a1c8fd08b9
HEAD_REF main HEAD_REF main
) )

View File

@ -1,6 +1,7 @@
{ {
"name": "halide", "name": "halide",
"version": "17.0.1", "version": "17.0.1",
"port-version": 1,
"description": "Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.", "description": "Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.",
"homepage": "https://github.com/halide/Halide", "homepage": "https://github.com/halide/Halide",
"license": "MIT", "license": "MIT",

View File

@ -11,9 +11,8 @@
flang/tools/f18/CMakeLists.txt | 2 +- flang/tools/f18/CMakeLists.txt | 2 +-
flang/tools/flang-driver/CMakeLists.txt | 2 +- flang/tools/flang-driver/CMakeLists.txt | 2 +-
lld/cmake/modules/AddLLD.cmake | 2 +- lld/cmake/modules/AddLLD.cmake | 2 +-
lld/tools/lld/CMakeLists.txt | 2 +-
lldb/cmake/modules/AddLLDB.cmake | 2 +- lldb/cmake/modules/AddLLDB.cmake | 2 +-
15 files changed, 16 insertions(+), 16 deletions(-) 14 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/bolt/cmake/modules/AddBOLT.cmake b/bolt/cmake/modules/AddBOLT.cmake diff --git a/bolt/cmake/modules/AddBOLT.cmake b/bolt/cmake/modules/AddBOLT.cmake
index 1f69b9046320..b0de5186dde4 100644 index 1f69b9046320..b0de5186dde4 100644
@ -29,10 +28,10 @@ index 1f69b9046320..b0de5186dde4 100644
if(NOT LLVM_ENABLE_IDE) if(NOT LLVM_ENABLE_IDE)
diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
index 3ce552872015..ce5a899ebe6d 100644 index b220cbea80f1..b94501ec82ab 100644
--- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt --- a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt +++ b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
@@ -64,6 +64,6 @@ install(PROGRAMS clang-tidy-diff.py @@ -65,6 +65,6 @@ install(PROGRAMS clang-tidy-diff.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-tidy) COMPONENT clang-tidy)
install(PROGRAMS run-clang-tidy.py install(PROGRAMS run-clang-tidy.py
@ -41,10 +40,10 @@ index 3ce552872015..ce5a899ebe6d 100644
COMPONENT clang-tidy COMPONENT clang-tidy
RENAME run-clang-tidy) RENAME run-clang-tidy)
diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt
index 28635ca1089d..4516c8fb7ad0 100644 index eb5383c3ad44..39a34dfe8c71 100644
--- a/clang-tools-extra/modularize/CMakeLists.txt --- a/clang-tools-extra/modularize/CMakeLists.txt
+++ b/clang-tools-extra/modularize/CMakeLists.txt +++ b/clang-tools-extra/modularize/CMakeLists.txt
@@ -24,5 +24,5 @@ clang_target_link_libraries(modularize @@ -27,5 +27,5 @@ clang_target_link_libraries(modularize
) )
install(TARGETS modularize install(TARGETS modularize
@ -78,16 +77,18 @@ index 0ae1b4e55244..7774cd27afcd 100644
install(TARGETS c-index-test install(TARGETS c-index-test
diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt
index 30c93f8667c8..5c6f87f62e8e 100644 index 1c61a3c8fb80..4220d90274bd 100644
--- a/clang/tools/clang-format/CMakeLists.txt --- a/clang/tools/clang-format/CMakeLists.txt
+++ b/clang/tools/clang-format/CMakeLists.txt +++ b/clang/tools/clang-format/CMakeLists.txt
@@ -36,5 +36,5 @@ install(FILES clang-format.py @@ -36,7 +36,7 @@ install(FILES clang-format.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format) COMPONENT clang-format)
install(PROGRAMS git-clang-format install(PROGRAMS git-clang-format
- DESTINATION "${CMAKE_INSTALL_BINDIR}" - DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ DESTINATION "${CLANG_TOOLS_INSTALL_DIR}" + DESTINATION "${CLANG_TOOLS_INSTALL_DIR}"
COMPONENT clang-format) COMPONENT clang-format)
if (WIN32 AND NOT CYGWIN)
diff --git a/clang/tools/scan-build-py/CMakeLists.txt b/clang/tools/scan-build-py/CMakeLists.txt diff --git a/clang/tools/scan-build-py/CMakeLists.txt b/clang/tools/scan-build-py/CMakeLists.txt
index 3aca22c0b0a8..a8283219c99f 100644 index 3aca22c0b0a8..a8283219c99f 100644
--- a/clang/tools/scan-build-py/CMakeLists.txt --- a/clang/tools/scan-build-py/CMakeLists.txt
@ -150,10 +151,10 @@ index 41ce8738e7bf..d9659c4cf53a 100644
if(NOT LLVM_ENABLE_IDE) if(NOT LLVM_ENABLE_IDE)
diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index d7538feef121..ec8b7737ee22 100644 index ba6c6642c0b6..ab2802aeeaaa 100644
--- a/flang/tools/f18/CMakeLists.txt --- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt +++ b/flang/tools/f18/CMakeLists.txt
@@ -75,7 +75,7 @@ if (NOT WIN32) @@ -83,7 +83,7 @@ if (NOT WIN32)
@ONLY @ONLY
) )
add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc) add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
@ -173,36 +174,23 @@ index 3ce8b407450d..6b2e2b0dc33a 100644
-install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}") -install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install(TARGETS flang-new DESTINATION "${FLANG_TOOLS_INSTALL_DIR}") +install(TARGETS flang-new DESTINATION "${FLANG_TOOLS_INSTALL_DIR}")
diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake
index d3924f7243d4..318b41b73705 100644 index 2ee066b41535..c6a4740ab9eb 100644
--- a/lld/cmake/modules/AddLLD.cmake --- a/lld/cmake/modules/AddLLD.cmake
+++ b/lld/cmake/modules/AddLLD.cmake +++ b/lld/cmake/modules/AddLLD.cmake
@@ -47,7 +47,7 @@ macro(add_lld_tool name) @@ -56,7 +56,7 @@ macro(add_lld_tool name)
get_target_export_arg(${name} LLD export_to_lldtargets) get_target_export_arg(${name} LLD export_to_lldtargets)
install(TARGETS ${name} install(TARGETS ${name}
${export_to_lldtargets} ${export_to_lldtargets}
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ RUNTIME DESTINATION "${LLD_TOOLS_INSTALL_DIR}" + RUNTIME DESTINATION "${LLD_TOOLS_INSTALL_DIR}"
COMPONENT ${name}) COMPONENT ${name})
if(NOT CMAKE_CONFIGURATION_TYPES) if(NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt
index 12628395680b..ee58ed439a3a 100644
--- a/lld/tools/lld/CMakeLists.txt
+++ b/lld/tools/lld/CMakeLists.txt
@@ -29,7 +29,7 @@ lld_target_link_libraries(lld
)
install(TARGETS lld
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ RUNTIME DESTINATION "${LLD_TOOLS_INSTALL_DIR}")
if(NOT LLD_SYMLINKS_TO_CREATE)
set(LLD_SYMLINKS_TO_CREATE
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index d47a30f5e109..f0bbc0e50627 100644 index 328e883ddbe5..86eebba45e01 100644
--- a/lldb/cmake/modules/AddLLDB.cmake --- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -216,7 +216,7 @@ function(add_lldb_executable name) @@ -221,7 +221,7 @@ function(add_lldb_executable name)
endif() endif()
if(ARG_GENERATE_INSTALL) if(ARG_GENERATE_INSTALL)

View File

@ -2,7 +2,7 @@
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
index e86eb2b44b10..04e00944f891 100644 index d5b76b1bb6c1..9fedcb2ab75f 100644
--- a/llvm/tools/llvm-config/llvm-config.cpp --- a/llvm/tools/llvm-config/llvm-config.cpp
+++ b/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp
@@ -304,7 +304,7 @@ int main(int argc, char **argv) { @@ -304,7 +304,7 @@ int main(int argc, char **argv) {

View File

@ -1,45 +0,0 @@
compiler-rt/lib/asan/CMakeLists.txt | 2 +-
compiler-rt/lib/interception/CMakeLists.txt | 2 +-
compiler-rt/lib/ubsan/CMakeLists.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index 1bfc6f0c5e37..f35c385c379a 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/lib/asan/CMakeLists.txt
@@ -92,7 +92,7 @@ append_rtti_flag(OFF ASAN_CFLAGS)
# Silence warnings in system headers with MSVC.
if(NOT CLANG_CL)
- append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" ASAN_CFLAGS)
+ append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" ASAN_CFLAGS)
endif()
# Too many existing bugs, needs cleanup.
diff --git a/compiler-rt/lib/interception/CMakeLists.txt b/compiler-rt/lib/interception/CMakeLists.txt
index 3242cf50e35f..abe9229340be 100644
--- a/compiler-rt/lib/interception/CMakeLists.txt
+++ b/compiler-rt/lib/interception/CMakeLists.txt
@@ -21,7 +21,7 @@ append_rtti_flag(OFF INTERCEPTION_CFLAGS)
# Silence warnings in system headers with MSVC.
if(NOT CLANG_CL)
- append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" INTERCEPTION_CFLAGS)
+ append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" INTERCEPTION_CFLAGS)
endif()
add_compiler_rt_object_libraries(RTInterception
diff --git a/compiler-rt/lib/ubsan/CMakeLists.txt b/compiler-rt/lib/ubsan/CMakeLists.txt
index 520a024fbede..75b0b12b9da2 100644
--- a/compiler-rt/lib/ubsan/CMakeLists.txt
+++ b/compiler-rt/lib/ubsan/CMakeLists.txt
@@ -57,7 +57,7 @@ append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS)
# Silence warnings in system headers with MSVC.
if(NOT CLANG_CL)
- append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" UBSAN_CXXFLAGS)
+ append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" UBSAN_CXXFLAGS)
endif()
set(UBSAN_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})

View File

@ -1,71 +0,0 @@
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index b5d29b2e9..b4fc088a1 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -4088,6 +4088,9 @@ CXCursorKind clang::getCursorKindForDecl(const Decl *D) {
case Decl::Concept:
return CXCursor_ConceptDecl;
+ case Decl::LinkageSpec:
+ return CXCursor_LinkageSpec;
+
default:
if (const auto *TD = dyn_cast<TagDecl>(D)) {
switch (TD->getTagKind()) {
diff --git a/clang/test/Index/recursive-cxx-member-calls.cpp b/clang/test/Index/recursive-cxx-member-calls.cpp
index 09f3f4141..be908c506 100644
--- a/clang/test/Index/recursive-cxx-member-calls.cpp
+++ b/clang/test/Index/recursive-cxx-member-calls.cpp
@@ -216,9 +216,9 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Punctuation: "}" [4:63 - 4:64] ClassTemplate=pair:4:44 (Definition)
// CHECK-tokens: Punctuation: ";" [4:64 - 4:65] Namespace=std:3:11 (Definition)
// CHECK-tokens: Punctuation: "}" [5:1 - 5:2] Namespace=std:3:11 (Definition)
-// CHECK-tokens: Keyword: "extern" [6:1 - 6:7]
-// CHECK-tokens: Literal: ""C"" [6:8 - 6:11] UnexposedDecl=:6:8 (Definition)
-// CHECK-tokens: Punctuation: "{" [6:12 - 6:13] UnexposedDecl=:6:8 (Definition)
+// CHECK-tokens: Keyword: "extern" [6:1 - 6:7] LinkageSpec=:6:8 (Definition)
+// CHECK-tokens: Literal: ""C"" [6:8 - 6:11] LinkageSpec=:6:8 (Definition)
+// CHECK-tokens: Punctuation: "{" [6:12 - 6:13] LinkageSpec=:6:8 (Definition)
// CHECK-tokens: Keyword: "int" [7:3 - 7:6] FunctionDecl=memcmp:7:7
// CHECK-tokens: Identifier: "memcmp" [7:7 - 7:13] FunctionDecl=memcmp:7:7
// CHECK-tokens: Punctuation: "(" [7:13 - 7:14] FunctionDecl=memcmp:7:7
@@ -232,7 +232,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Punctuation: "," [7:40 - 7:41] FunctionDecl=memcmp:7:7
// CHECK-tokens: Identifier: "size_t" [7:42 - 7:48] TypeRef=size_t:2:25
// CHECK-tokens: Punctuation: ")" [7:48 - 7:49] FunctionDecl=memcmp:7:7
-// CHECK-tokens: Punctuation: ";" [7:49 - 7:50] UnexposedDecl=:6:8 (Definition)
+// CHECK-tokens: Punctuation: ";" [7:49 - 7:50] LinkageSpec=:6:8 (Definition)
// CHECK-tokens: Identifier: "size_t" [8:3 - 8:9] TypeRef=size_t:2:25
// CHECK-tokens: Identifier: "strlen" [8:10 - 8:16] FunctionDecl=strlen:8:10
// CHECK-tokens: Punctuation: "(" [8:16 - 8:17] FunctionDecl=strlen:8:10
@@ -1532,7 +1532,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 4:20: TemplateTypeParameter=_T1:4:20 (Definition) Extent=[4:14 - 4:23]
// CHECK: 4:31: TemplateTypeParameter=_T2:4:31 (Definition) Extent=[4:25 - 4:34]
// CHECK: 4:55: FieldDecl=second:4:55 (Definition) Extent=[4:51 - 4:61]
-// CHECK: 6:8: UnexposedDecl=:6:8 (Definition) Extent=[6:1 - 9:2]
+// CHECK: 6:8: LinkageSpec=:6:8 (Definition) Extent=[6:1 - 9:2]
// CHECK: 7:7: FunctionDecl=memcmp:7:7 Extent=[7:3 - 7:49]
// CHECK: 7:26: ParmDecl=:7:26 (Definition) Extent=[7:14 - 7:26]
// CHECK: 7:40: ParmDecl=:7:40 (Definition) Extent=[7:28 - 7:40]
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 9d66a22f3..2c0c9cb8e 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -1838,6 +1838,8 @@ static enum CXChildVisitResult PrintMangledName(CXCursor cursor, CXCursor p,
CXString MangledName;
if (clang_isUnexposed(clang_getCursorKind(cursor)))
return CXChildVisit_Recurse;
+ if (clang_getCursorKind(cursor) == CXCursor_LinkageSpec)
+ return CXChildVisit_Recurse;
PrintCursor(cursor, NULL);
MangledName = clang_Cursor_getMangling(cursor);
printf(" [mangled=%s]\n", clang_getCString(MangledName));
@@ -1853,6 +1855,8 @@ static enum CXChildVisitResult PrintManglings(CXCursor cursor, CXCursor p,
return CXChildVisit_Recurse;
if (!clang_isDeclaration(clang_getCursorKind(cursor)))
return CXChildVisit_Recurse;
+ if (clang_getCursorKind(cursor) == CXCursor_LinkageSpec)
+ return CXChildVisit_Recurse;
if (clang_getCursorKind(cursor) == CXCursor_ParmDecl)
return CXChildVisit_Continue;
PrintCursor(cursor, NULL);

View File

@ -1,13 +0,0 @@
diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
index 4b281d5f1..0a008ab9b 100644
--- a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
@@ -951,7 +951,7 @@ std::vector<
DwarfLinkerForBinary::AddressManager<AddressesMapBase>::getRelocations(
const std::vector<ValidReloc> &Relocs, uint64_t StartPos, uint64_t EndPos) {
std::vector<
- DwarfLinkerForBinary::AddressManager<AddressesMapBase>::ValidReloc>
+ typename DwarfLinkerForBinary::AddressManager<AddressesMapBase>::ValidReloc>
Res;
auto CurReloc = partition_point(Relocs, [StartPos](const ValidReloc &Reloc) {

1350
ports/llvm/75711.patch Normal file

File diff suppressed because it is too large Load Diff

217
ports/llvm/79694.patch Normal file
View File

@ -0,0 +1,217 @@
From 48908fb6d5387082018fb1d8b2f0ddb65e2e2baa Mon Sep 17 00:00:00 2001
From: Phoebe Wang <phoebe.wang@intel.com>
Date: Sat, 27 Jan 2024 22:03:06 +0800
Subject: [PATCH 1/2] [SEH] Ignore EH pad check for internal intrinsics
Intrinsics like @llvm.seh.scope.begin and @llvm.seh.scope.end which do not throw do not need funclets in catchpads or cleanuppads.
Fixes #69428
Co-authored-by: Robert Cox <robert.cox@intel.com>
---
llvm/lib/IR/Verifier.cpp | 5 +++
llvm/test/Verifier/pr69428.ll | 80 +++++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+)
create mode 100644 llvm/test/Verifier/pr69428.ll
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 91cf91fbc788bd..0f1e9fa40c9b03 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -4280,6 +4280,11 @@ void Verifier::visitEHPadPredecessors(Instruction &I) {
if (auto *II = dyn_cast<InvokeInst>(TI)) {
Check(II->getUnwindDest() == BB && II->getNormalDest() != BB,
"EH pad must be jumped to via an unwind edge", ToPad, II);
+ auto *CalledFn =
+ dyn_cast<Function>(II->getCalledOperand()->stripPointerCasts());
+ if (CalledFn && CalledFn->isIntrinsic() && II->doesNotThrow() &&
+ !IntrinsicInst::mayLowerToFunctionCall(CalledFn->getIntrinsicID()))
+ continue;
if (auto Bundle = II->getOperandBundle(LLVMContext::OB_funclet))
FromPad = Bundle->Inputs[0];
else
diff --git a/llvm/test/Verifier/pr69428.ll b/llvm/test/Verifier/pr69428.ll
new file mode 100644
index 00000000000000..22d732076e3af7
--- /dev/null
+++ b/llvm/test/Verifier/pr69428.ll
@@ -0,0 +1,80 @@
+; RUN: llvm-as -disable-output %s
+
+%struct._List_node_emplace_op2 = type { i8 }
+
+$"??1?$_List_node_emplace_op2@H@@QEAA@XZ" = comdat any
+
+@"?_List@@3HA" = dso_local local_unnamed_addr global i32 0, align 4
+
+; Function Attrs: mustprogress noreturn
+define dso_local void @"?ExecutionEngineaddExecutableDependency@@YAXXZ"() local_unnamed_addr #0 personality ptr @__CxxFrameHandler3 {
+entry:
+ %agg.tmp.ensured.i = alloca %struct._List_node_emplace_op2, align 1
+ call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %agg.tmp.ensured.i)
+ %0 = load i32, ptr @"?_List@@3HA", align 4
+ %call.i = call noundef ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i, i32 noundef %0)
+ invoke void @llvm.seh.scope.begin()
+ to label %invoke.cont.i unwind label %ehcleanup.i
+
+invoke.cont.i: ; preds = %entry
+ invoke void @llvm.seh.scope.end()
+ to label %invoke.cont2.i unwind label %ehcleanup.i
+
+invoke.cont2.i: ; preds = %invoke.cont.i
+ call void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6
+ unreachable
+
+ehcleanup.i: ; preds = %invoke.cont.i, %entry
+ %1 = cleanuppad within none []
+ invoke void @llvm.seh.scope.begin()
+ to label %invoke.cont.i.i unwind label %ehcleanup.i.i
+
+invoke.cont.i.i: ; preds = %ehcleanup.i
+ invoke void @llvm.seh.scope.end()
+ to label %"??1?$_List_node_emplace_op2@H@@QEAA@XZ.exit.i" unwind label %ehcleanup.i.i
+
+ehcleanup.i.i: ; preds = %invoke.cont.i.i, %ehcleanup.i
+ %2 = cleanuppad within %1 []
+ call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6 [ "funclet"(token %2) ]
+ cleanupret from %2 unwind to caller
+
+"??1?$_List_node_emplace_op2@H@@QEAA@XZ.exit.i": ; preds = %invoke.cont.i.i
+ call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6 [ "funclet"(token %1) ]
+ cleanupret from %1 unwind to caller
+}
+
+declare dso_local noundef ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr noundef nonnull returned align 1 dereferenceable(1), i32 noundef) unnamed_addr #1
+
+declare dso_local i32 @__CxxFrameHandler3(...)
+
+; Function Attrs: nofree nosync nounwind memory(none)
+declare dso_local void @llvm.seh.scope.begin() #2
+
+; Function Attrs: nofree nosync nounwind memory(none)
+declare dso_local void @llvm.seh.scope.end() #2
+
+; Function Attrs: mustprogress nounwind
+define linkonce_odr dso_local void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #3 comdat align 2 personality ptr @__CxxFrameHandler3 {
+entry:
+ invoke void @llvm.seh.scope.begin()
+ to label %invoke.cont unwind label %ehcleanup
+
+invoke.cont: ; preds = %entry
+ invoke void @llvm.seh.scope.end()
+ to label %invoke.cont2 unwind label %ehcleanup
+
+invoke.cont2: ; preds = %invoke.cont
+ tail call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) #6
+ ret void
+
+ehcleanup: ; preds = %invoke.cont, %entry
+ %0 = cleanuppad within none []
+ call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) #6 [ "funclet"(token %0) ]
+ cleanupret from %0 unwind to caller
+}
+
+; Function Attrs: nounwind
+declare dso_local void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4
+
+; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
+declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #5
From a9ea5c30d2fe81ed8774812bf13700c6a81e4900 Mon Sep 17 00:00:00 2001
From: Phoebe Wang <phoebe.wang@intel.com>
Date: Fri, 2 Feb 2024 20:19:50 +0800
Subject: [PATCH 2/2] Simplify test case
---
llvm/test/Verifier/pr69428.ll | 56 ++++++++---------------------------
1 file changed, 12 insertions(+), 44 deletions(-)
diff --git a/llvm/test/Verifier/pr69428.ll b/llvm/test/Verifier/pr69428.ll
index 22d732076e3af7..be8733bea1ab39 100644
--- a/llvm/test/Verifier/pr69428.ll
+++ b/llvm/test/Verifier/pr69428.ll
@@ -2,17 +2,13 @@
%struct._List_node_emplace_op2 = type { i8 }
-$"??1?$_List_node_emplace_op2@H@@QEAA@XZ" = comdat any
+@"?_List@@3HA" = global i32 0, align 4
-@"?_List@@3HA" = dso_local local_unnamed_addr global i32 0, align 4
-
-; Function Attrs: mustprogress noreturn
-define dso_local void @"?ExecutionEngineaddExecutableDependency@@YAXXZ"() local_unnamed_addr #0 personality ptr @__CxxFrameHandler3 {
+define void @"?ExecutionEngineaddExecutableDependency@@YAXXZ"() personality ptr @__CxxFrameHandler3 {
entry:
%agg.tmp.ensured.i = alloca %struct._List_node_emplace_op2, align 1
- call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %agg.tmp.ensured.i)
%0 = load i32, ptr @"?_List@@3HA", align 4
- %call.i = call noundef ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i, i32 noundef %0)
+ %call.i = call noundef ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr %agg.tmp.ensured.i, i32 %0)
invoke void @llvm.seh.scope.begin()
to label %invoke.cont.i unwind label %ehcleanup.i
@@ -21,7 +17,7 @@ invoke.cont.i: ; preds = %entry
to label %invoke.cont2.i unwind label %ehcleanup.i
invoke.cont2.i: ; preds = %invoke.cont.i
- call void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6
+ call void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr %agg.tmp.ensured.i) #6
unreachable
ehcleanup.i: ; preds = %invoke.cont.i, %entry
@@ -35,46 +31,18 @@ invoke.cont.i.i: ; preds = %ehcleanup.i
ehcleanup.i.i: ; preds = %invoke.cont.i.i, %ehcleanup.i
%2 = cleanuppad within %1 []
- call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6 [ "funclet"(token %2) ]
+ call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr %agg.tmp.ensured.i) #6 [ "funclet"(token %2) ]
cleanupret from %2 unwind to caller
"??1?$_List_node_emplace_op2@H@@QEAA@XZ.exit.i": ; preds = %invoke.cont.i.i
- call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp.ensured.i) #6 [ "funclet"(token %1) ]
+ call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr %agg.tmp.ensured.i) #6 [ "funclet"(token %1) ]
cleanupret from %1 unwind to caller
}
-declare dso_local noundef ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr noundef nonnull returned align 1 dereferenceable(1), i32 noundef) unnamed_addr #1
-
-declare dso_local i32 @__CxxFrameHandler3(...)
-
-; Function Attrs: nofree nosync nounwind memory(none)
-declare dso_local void @llvm.seh.scope.begin() #2
-
-; Function Attrs: nofree nosync nounwind memory(none)
-declare dso_local void @llvm.seh.scope.end() #2
-
-; Function Attrs: mustprogress nounwind
-define linkonce_odr dso_local void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #3 comdat align 2 personality ptr @__CxxFrameHandler3 {
-entry:
- invoke void @llvm.seh.scope.begin()
- to label %invoke.cont unwind label %ehcleanup
-
-invoke.cont: ; preds = %entry
- invoke void @llvm.seh.scope.end()
- to label %invoke.cont2 unwind label %ehcleanup
-
-invoke.cont2: ; preds = %invoke.cont
- tail call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) #6
- ret void
-
-ehcleanup: ; preds = %invoke.cont, %entry
- %0 = cleanuppad within none []
- call void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1) %this) #6 [ "funclet"(token %0) ]
- cleanupret from %0 unwind to caller
-}
-
-; Function Attrs: nounwind
-declare dso_local void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4
+declare i32 @__CxxFrameHandler3(...)
+declare void @llvm.seh.scope.begin()
+declare void @llvm.seh.scope.end()
-; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
-declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #5
+declare void @"??1?$_List_node_emplace_op2@H@@QEAA@XZ"(ptr)
+declare void @"??1_Alloc_construct_ptr@@QEAA@XZ"(ptr)
+declare ptr @"??0?$_List_node_emplace_op2@H@@QEAA@H@Z"(ptr, i32)

112
ports/llvm/82407.patch Normal file
View File

@ -0,0 +1,112 @@
From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour <shafik.yaghmour@intel.com>
Date: Tue, 20 Feb 2024 11:22:39 -0800
Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of
union with nontrivial member
In 765d8a192180f8f33618087b15c022fe758044af we impelemented a fix for incorrect deletion of
default constructors in unions. This fix missed a case and so this PR will
extend the fix to cover the additional case.
Fixes: https://github.com/llvm/llvm-project/issues/81774
---
clang/lib/Sema/SemaDeclCXX.cpp | 18 +++++++++++++++---
.../test/CodeGen/union-non-trivial-member.cpp | 17 +++++++++++++++++
clang/test/SemaCXX/cxx0x-nontrivial-union.cpp | 11 +++++++++++
4 files changed, 46 insertions(+), 3 deletions(-)
Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 79263bc3ff671..25a4b4381ca25 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -9442,9 +9442,21 @@ bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
int DiagKind = -1;
- if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::NoMemberOrDeleted)
- DiagKind = !Decl ? 0 : 1;
- else if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::Ambiguous)
+ if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::NoMemberOrDeleted) {
+ if (CSM == Sema::CXXDefaultConstructor && Field &&
+ Field->getParent()->isUnion()) {
+ // [class.default.ctor]p2:
+ // A defaulted default constructor for class X is defined as deleted if
+ // - X is a union that has a variant member with a non-trivial default
+ // constructor and no variant member of X has a default member
+ // initializer
+ const auto *RD = cast<CXXRecordDecl>(Field->getParent());
+ if (!RD->hasInClassInitializer())
+ DiagKind = !Decl ? 0 : 1;
+ } else {
+ DiagKind = !Decl ? 0 : 1;
+ }
+ } else if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::Ambiguous)
DiagKind = 2;
else if (!isAccessible(Subobj, Decl))
DiagKind = 3;
diff --git a/clang/test/CodeGen/union-non-trivial-member.cpp b/clang/test/CodeGen/union-non-trivial-member.cpp
index fdc9fd16911e1..8b055a9970fc7 100644
--- a/clang/test/CodeGen/union-non-trivial-member.cpp
+++ b/clang/test/CodeGen/union-non-trivial-member.cpp
@@ -15,14 +15,25 @@ union UnionNonTrivial {
non_trivial_constructor b{};
};
+struct Handle {
+ Handle(int) {}
+};
+
+union UnionNonTrivialEqualInit {
+ int NoState = 0;
+ Handle CustomState;
+};
+
void f() {
UnionInt u1;
UnionNonTrivial u2;
+ UnionNonTrivialEqualInit u3;
}
// CHECK: define dso_local void @_Z1fv()
// CHECK: call void @_ZN8UnionIntC1Ev
// CHECK-NEXT: call void @_ZN15UnionNonTrivialC1Ev
+// CHECK-NEXT: call void @_ZN24UnionNonTrivialEqualInitC1Ev
// CHECK: define {{.*}}void @_ZN8UnionIntC1Ev
// CHECK: call void @_ZN8UnionIntC2Ev
@@ -30,8 +41,14 @@ void f() {
// CHECK: define {{.*}}void @_ZN15UnionNonTrivialC1Ev
// CHECK: call void @_ZN15UnionNonTrivialC2Ev
+// CHECK: define {{.*}}void @_ZN24UnionNonTrivialEqualInitC1Ev
+// CHECK: call void @_ZN24UnionNonTrivialEqualInitC2Ev
+
// CHECK: define {{.*}}void @_ZN8UnionIntC2Ev
// CHECK: store i32 1000
// CHECK: define {{.*}}void @_ZN15UnionNonTrivialC2Ev
// CHECK: call void @_ZN23non_trivial_constructorC1Ev
+
+// CHECK: define {{.*}}void @_ZN24UnionNonTrivialEqualInitC2Ev
+// CHECK: store i32 0
diff --git a/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp b/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp
index c7cdf76d850db..833642b3d739a 100644
--- a/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp
+++ b/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp
@@ -188,3 +188,14 @@ static_assert(U2().b.x == 100, "");
static_assert(U3().b.x == 100, "");
} // namespace GH48416
+
+namespace GH81774 {
+struct Handle {
+ Handle(int) {}
+};
+// Should be well-formed because NoState has a brace-or-equal-initializer.
+union a {
+ int NoState = 0;
+ Handle CustomState;
+} b;
+} // namespace GH81774

View File

@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO llvm/llvm-project REPO llvm/llvm-project
REF "llvmorg-${VERSION}" REF "llvmorg-${VERSION}"
SHA512 362ddb94fdd22d05bd11c950f1711eafbd47424f6da0b1b061da012ef1b39dd8f7efeb91b53c036ea0708aa3845893fe39d1fb529ac3b928df738b88717d1aee SHA512 9e9ec501336127339347c01ffd47768d501a84ef415c6a72fe56d31e867f982baeb3c4659be8e9b8475848a460357f33a6b2aa0ee9f81150e363963b98387bc0
HEAD_REF main HEAD_REF main
PATCHES PATCHES
0001-fix-install-package-dir.patch 0001-fix-install-package-dir.patch
@ -13,9 +13,9 @@ vcpkg_from_github(
0004-disable-libomp-aliases.patch 0004-disable-libomp-aliases.patch
0005-remove-numpy.patch 0005-remove-numpy.patch
0006-create-destination-mlir-directory.patch 0006-create-destination-mlir-directory.patch
0007-fix-compiler-rt-warnings.patch # fixed in upstream 75711.patch # [clang] Add intrin0.h header to mimic intrin0.h used by MSVC STL for clang-cl #75711
0008-add-missing-case.patch # From upstream https://github.com/llvm/llvm-project/pull/72401 79694.patch # [SEH] Ignore EH pad check for internal intrinsics #79694
0009-add-missing-typename.patch # Fixed in version 18.1.0 and later 82407.patch # [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member #82407
) )
vcpkg_check_features( vcpkg_check_features(
@ -326,20 +326,34 @@ llvm_cmake_package_config_fixup("polly" DO_NOT_DELETE_PARENT_CONFIG_PATH)
llvm_cmake_package_config_fixup("ParallelSTL" FEATURE_NAME "pstl" DO_NOT_DELETE_PARENT_CONFIG_PATH CONFIG_PATH "lib/cmake/ParallelSTL") llvm_cmake_package_config_fixup("ParallelSTL" FEATURE_NAME "pstl" DO_NOT_DELETE_PARENT_CONFIG_PATH CONFIG_PATH "lib/cmake/ParallelSTL")
llvm_cmake_package_config_fixup("llvm") llvm_cmake_package_config_fixup("llvm")
set(empty_dirs) if("mlir" IN_LIST FEATURES)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mlir/MLIRConfig.cmake" "set(MLIR_MAIN_SRC_DIR \"${SOURCE_PATH}/mlir\")" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mlir/MLIRConfig.cmake" "${CURRENT_BUILDTREES_DIR}" "\${MLIR_INCLUDE_DIRS}")
endif()
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
# Move Clang's runtime libraries from bin/lib to tools/${PORT}/lib
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/lib" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/lib")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/lib")
endif()
# Remove empty directories to avoid vcpkg warning
set(empty_dirs)
if("clang-tools-extra" IN_LIST FEATURES) if("clang-tools-extra" IN_LIST FEATURES)
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/clang-tidy/plugin") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/clang-tidy/plugin")
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/clang-tidy/misc/ConfusableTable") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/clang-tidy/misc/ConfusableTable")
endif() endif()
if("pstl" IN_LIST FEATURES) if("pstl" IN_LIST FEATURES)
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/lib/cmake") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/lib/cmake")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
endif() endif()
endif() endif()
if("flang" IN_LIST FEATURES) if("flang" IN_LIST FEATURES)
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/CMakeFiles") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/CMakeFiles")
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Config") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Config")
@ -349,7 +363,6 @@ if("flang" IN_LIST FEATURES)
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Optimizer/HLFIR/CMakeFiles") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Optimizer/HLFIR/CMakeFiles")
list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Optimizer/Transforms/CMakeFiles") list(APPEND empty_dirs "${CURRENT_PACKAGES_DIR}/include/flang/Optimizer/Transforms/CMakeFiles")
endif() endif()
if(empty_dirs) if(empty_dirs)
foreach(empty_dir IN LISTS empty_dirs) foreach(empty_dir IN LISTS empty_dirs)
if(NOT EXISTS "${empty_dir}") if(NOT EXISTS "${empty_dir}")
@ -365,12 +378,7 @@ if(empty_dirs)
endforeach() endforeach()
endif() endif()
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") # Remove debug headers and tools
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/lib" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/lib")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/share"
@ -378,17 +386,9 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
) )
endif() endif()
if("mlir" IN_LIST FEATURES) # LLVM generates shared libraries in a static build (LLVM-C.dll, libclang.dll, LTO.dll, Remarks.dll, ...)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mlir/MLIRConfig.cmake" "set(MLIR_MAIN_SRC_DIR \"${SOURCE_PATH}/mlir\")" "") # for the corresponding export targets (used in LLVMExports-<config>.cmake files on the Windows platform)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mlir/MLIRConfig.cmake" "${CURRENT_BUILDTREES_DIR}" "\${MLIR_INCLUDE_DIRS}")
endif()
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_WINDOWS)
# LLVM still generates a few DLLs in the static build:
# * LLVM-C.dll
# * libclang.dll
# * LTO.dll
# * Remarks.dll
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
else() else()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin"

View File

@ -1,7 +1,6 @@
{ {
"name": "llvm", "name": "llvm",
"version": "17.0.2", "version": "18.1.6",
"port-version": 5,
"description": "The LLVM Compiler Infrastructure.", "description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org", "homepage": "https://llvm.org",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -1,127 +0,0 @@
From 2d4fe5f229791fde52846b3f583c12508b5109d6 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 25 Aug 2023 12:43:44 +1000
Subject: [PATCH] clover/llvm: move to modern pass manager.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This seems like it should work, but I haven't tested it yet.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24879>
---
.../frontends/clover/llvm/invocation.cpp | 64 +++++++++++++++----
1 file changed, 51 insertions(+), 13 deletions(-)
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index 7a50fea332395..43d26fe1abbce 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -27,13 +27,17 @@
#include <llvm/IR/DiagnosticPrinter.h>
#include <llvm/IR/DiagnosticInfo.h>
#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
#include <llvm/Support/raw_ostream.h>
-#include <llvm/Transforms/IPO/PassManagerBuilder.h>
+#include <llvm/Transforms/IPO/Internalize.h>
#include <llvm-c/Target.h>
#ifdef HAVE_CLOVER_SPIRV
#include <LLVMSPIRVLib/LLVMSPIRVLib.h>
#endif
+#include <llvm-c/TargetMachine.h>
+#include <llvm-c/Transforms/PassBuilder.h>
+#include <llvm/Support/CBindingWrapping.h>
#include <clang/CodeGen/CodeGenAction.h>
#include <clang/Lex/PreprocessorOptions.h>
#include <clang/Frontend/TextDiagnosticBuffer.h>
@@ -439,10 +443,10 @@ clover::llvm::compile_program(const std::string &source,
namespace {
void
- optimize(Module &mod, unsigned optimization_level,
+ optimize(Module &mod,
+ const std::string& ir_target,
+ unsigned optimization_level,
bool internalize_symbols) {
- ::llvm::legacy::PassManager pm;
-
// By default, the function internalizer pass will look for a function
// called "main" and then mark all other functions as internal. Marking
// functions as internal enables the optimizer to perform optimizations
@@ -458,19 +462,53 @@ namespace {
if (internalize_symbols) {
std::vector<std::string> names =
map(std::mem_fn(&Function::getName), get_kernels(mod));
- pm.add(::llvm::createInternalizePass(
+ internalizeModule(mod,
[=](const ::llvm::GlobalValue &gv) {
return std::find(names.begin(), names.end(),
gv.getName()) != names.end();
- }));
+ });
}
- ::llvm::PassManagerBuilder pmb;
- pmb.OptLevel = optimization_level;
- pmb.LibraryInfo = new ::llvm::TargetLibraryInfoImpl(
- ::llvm::Triple(mod.getTargetTriple()));
- pmb.populateModulePassManager(pm);
- pm.run(mod);
+
+ const char *opt_str = NULL;
+ LLVMCodeGenOptLevel level;
+ switch (optimization_level) {
+ case 0:
+ default:
+ opt_str = "default<O0>";
+ level = LLVMCodeGenLevelNone;
+ break;
+ case 1:
+ opt_str = "default<O1>";
+ level = LLVMCodeGenLevelLess;
+ break;
+ case 2:
+ opt_str = "default<O2>";
+ level = LLVMCodeGenLevelDefault;
+ break;
+ case 3:
+ opt_str = "default<O3>";
+ level = LLVMCodeGenLevelAggressive;
+ break;
+ }
+
+ const target &target = ir_target;
+ LLVMTargetRef targ;
+ char *err_message;
+
+ if (LLVMGetTargetFromTriple(target.triple.c_str(), &targ, &err_message))
+ return;
+ LLVMTargetMachineRef tm =
+ LLVMCreateTargetMachine(targ, target.triple.c_str(),
+ target.cpu.c_str(), "", level,
+ LLVMRelocDefault, LLVMCodeModelDefault);
+
+ if (!tm)
+ return;
+ LLVMPassBuilderOptionsRef opts = LLVMCreatePassBuilderOptions();
+ LLVMRunPasses(wrap(&mod), opt_str, tm, opts);
+
+ LLVMDisposeTargetMachine(tm);
}
std::unique_ptr<Module>
@@ -500,7 +538,7 @@ clover::llvm::link_program(const std::vector<binary> &binaries,
auto c = create_compiler_instance(dev, dev.ir_target(), options, r_log);
auto mod = link(*ctx, *c, binaries, r_log);
- optimize(*mod, c->getCodeGenOpts().OptimizationLevel, !create_library);
+ optimize(*mod, dev.ir_target(), c->getCodeGenOpts().OptimizationLevel, !create_library);
static std::atomic_uint seq(0);
const std::string id = "." + mod->getModuleIdentifier() + "-" +
--
GitLab

View File

@ -1,42 +0,0 @@
From cda32e18a08fa2f2289a7409f37f44d5643e6aea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 23 Jun 2023 01:20:38 -0700
Subject: [PATCH] gallium: Fix build with llvm 17
These headers are not available for C files in llvm 17+
and they seem to be not needed to compile after all with llvm 17
so add conditions to exclude them for llvm >= 17
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index cd2108f3a088d..b1a4d0388a6a0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -46,15 +46,19 @@
#if GALLIVM_USE_NEW_PASS == 1
#include <llvm-c/Transforms/PassBuilder.h>
#elif GALLIVM_HAVE_CORO == 1
+#if LLVM_VERSION_MAJOR < 17
#include <llvm-c/Transforms/Scalar.h>
-#if LLVM_VERSION_MAJOR >= 7
+#endif
+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
#include <llvm-c/Transforms/Utils.h>
#endif
#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
#include <llvm-c/Transforms/IPO.h>
#endif
+#if LLVM_VERSION_MAJOR < 17
#include <llvm-c/Transforms/Coroutines.h>
#endif
+#endif
unsigned gallivm_perf = 0;
--
GitLab

View File

@ -8,12 +8,9 @@ vcpkg_from_gitlab(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO mesa/mesa REPO mesa/mesa
REF mesa-${VERSION} REF mesa-${VERSION}
SHA512 96f7602c98d532a269116bd5d3f9cbe87ca4425b309467cc19f83277a0faaa9804edea72dcaeb6f7774cac17790d5d76b58c357ef639cb6064e7480d93b861bf SHA512 202b2b20ffe7d357570a0d0bf0b53dc246b3e903738e8c8a000c5f61109ab5233d62de217444f49fd62927f8c418d929e5a2a5a800d1e39e334d50eb090e850c
FILE_DISAMBIGUATOR 1 FILE_DISAMBIGUATOR 1
HEAD_REF master HEAD_REF master
PATCHES
gallium-fix-build-with-llvm-17.patch
clover-llvm-move-to-modern-pass-manager.patch
) )
x_vcpkg_get_python_packages(PYTHON_VERSION "3" OUT_PYTHON_VAR "PYTHON3" PACKAGES setuptools mako) x_vcpkg_get_python_packages(PYTHON_VERSION "3" OUT_PYTHON_VAR "PYTHON3" PACKAGES setuptools mako)
@ -46,13 +43,9 @@ endif()
# For features https://github.com/pal1000/mesa-dist-win should be probably studied a bit more. # For features https://github.com/pal1000/mesa-dist-win should be probably studied a bit more.
list(APPEND MESA_OPTIONS -Dzstd=enabled) list(APPEND MESA_OPTIONS -Dzstd=enabled)
list(APPEND MESA_OPTIONS -Dshared-llvm=auto)
list(APPEND MESA_OPTIONS -Dlibunwind=disabled)
list(APPEND MESA_OPTIONS -Dlmsensors=disabled)
list(APPEND MESA_OPTIONS -Dvalgrind=disabled) list(APPEND MESA_OPTIONS -Dvalgrind=disabled)
list(APPEND MESA_OPTIONS -Dglvnd=false) list(APPEND MESA_OPTIONS -Dshared-llvm=disabled)
list(APPEND MESA_OPTIONS -Dglx=disabled) list(APPEND MESA_OPTIONS -Dcpp_rtti=true)
list(APPEND MESA_OPTIONS -Dgbm=disabled)
if("offscreen" IN_LIST FEATURES) if("offscreen" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Dosmesa=true) list(APPEND MESA_OPTIONS -Dosmesa=true)
@ -66,29 +59,32 @@ else()
list(APPEND MESA_OPTIONS -Dllvm=disabled) list(APPEND MESA_OPTIONS -Dllvm=disabled)
endif() endif()
set(use_gles OFF)
if("gles1" IN_LIST FEATURES) if("gles1" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Dgles1=enabled) list(APPEND MESA_OPTIONS -Dgles1=enabled)
set(use_gles ON)
else() else()
list(APPEND MESA_OPTIONS -Dgles1=disabled) list(APPEND MESA_OPTIONS -Dgles1=disabled)
endif() endif()
if("gles2" IN_LIST FEATURES) if("gles2" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Dgles2=enabled) list(APPEND MESA_OPTIONS -Dgles2=enabled)
set(use_gles ON)
else() else()
list(APPEND MESA_OPTIONS -Dgles2=disabled) list(APPEND MESA_OPTIONS -Dgles2=disabled)
endif() endif()
if("opengl" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Dopengl=true) if(use_gles)
list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) # shared GLAPI required when building two or more of the following APIs - gles1 gles2
else() else()
list(APPEND MESA_OPTIONS -Dopengl=false) list(APPEND MESA_OPTIONS -Dshared-glapi=auto)
endif() endif()
if("egl" IN_LIST FEATURES) # EGL feature only works on Linux
if("egl" IN_LIST FEATURES)
list(APPEND MESA_OPTIONS -Degl=enabled) list(APPEND MESA_OPTIONS -Degl=enabled)
else() else()
list(APPEND MESA_OPTIONS -Degl=disabled) list(APPEND MESA_OPTIONS -Degl=disabled)
endif() endif()
list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when building two or more of the following APIs - opengl, gles1 gles2
if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND MESA_OPTIONS -Dplatforms=['windows']) list(APPEND MESA_OPTIONS -Dplatforms=['windows'])
list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled) list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled)
@ -102,13 +98,12 @@ vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}" SOURCE_PATH "${SOURCE_PATH}"
OPTIONS OPTIONS
-Dgles-lib-suffix=_mesa -Dgles-lib-suffix=_mesa
#-D egl-lib-suffix=_mesa
-Dbuild-tests=false -Dbuild-tests=false
${MESA_OPTIONS} ${MESA_OPTIONS}
ADDITIONAL_BINARIES ADDITIONAL_BINARIES
python=['${PYTHON3}','-I'] python=['${PYTHON3}','-I']
python3=['${PYTHON3}','-I'] python3=['${PYTHON3}','-I']
) )
vcpkg_install_meson() vcpkg_install_meson()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()

View File

@ -1,7 +1,6 @@
{ {
"name": "mesa", "name": "mesa",
"version": "23.2.1", "version": "24.0.7",
"port-version": 1,
"description": "Mesa - The 3D Graphics Library", "description": "Mesa - The 3D Graphics Library",
"homepage": "https://www.mesa3d.org/", "homepage": "https://www.mesa3d.org/",
"license": "MIT AND BSL-1.0 AND SGI-B-2.0", "license": "MIT AND BSL-1.0 AND SGI-B-2.0",
@ -30,8 +29,7 @@
"default-features": false, "default-features": false,
"features": [ "features": [
"gles1", "gles1",
"gles2", "gles2"
"opengl"
] ]
}, },
{ {
@ -41,6 +39,14 @@
"llvm" "llvm"
], ],
"platform": "x64" "platform": "x64"
},
{
"name": "mesa",
"default-features": false,
"features": [
"egl"
],
"platform": "!osx"
} }
] ]
}, },
@ -53,25 +59,13 @@
"gles1": { "gles1": {
"description": "Build support for OpenGL ES 1.x", "description": "Build support for OpenGL ES 1.x",
"dependencies": [ "dependencies": [
{ "opengl"
"name": "mesa",
"default-features": false,
"features": [
"opengl"
]
}
] ]
}, },
"gles2": { "gles2": {
"description": "Build support for OpenGL ES 2.x and 3.x", "description": "Build support for OpenGL ES 2.x and 3.x",
"dependencies": [ "dependencies": [
{ "opengl"
"name": "mesa",
"default-features": false,
"features": [
"opengl"
]
}
] ]
}, },
"llvm": { "llvm": {
@ -113,18 +107,6 @@
}, },
"offscreen": { "offscreen": {
"description": "Build with support for offscreen rendering (OSMesa)", "description": "Build with support for offscreen rendering (OSMesa)",
"dependencies": [
{
"name": "mesa",
"default-features": false,
"features": [
"opengl"
]
}
]
},
"opengl": {
"description": "Build support for OpenGL (all versions)",
"dependencies": [ "dependencies": [
"opengl" "opengl"
] ]

View File

@ -1,8 +1,8 @@
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO symengine/symengine REPO symengine/symengine
REF "v${VERSION}" REF 450a0277e1116ab8c52582df9c77d42f9db3092a # unreleased version with LLVM 18 support
SHA512 91ea5d2d5b2b5ecbf7c3813bf2972a78384f7323ba328a556d7f8a2f54c39f44fceccd1465763a334df1b23f9031cbc87a8d930def0464345bb7fa271ecc508b SHA512 fb9bfe3cf6d48051b86f28c749cfdc19a2d5c1fc750f3c45c422559e9b8b9736d1cb542af5023a876640d917ad2198b24385fd085d8e20ff97e7ee660e056605
HEAD_REF master HEAD_REF master
) )

View File

@ -1,6 +1,7 @@
{ {
"name": "symengine", "name": "symengine",
"version": "0.11.2", "version": "0.11.2",
"port-version": 1,
"description": "SymEngine is a fast symbolic manipulation library", "description": "SymEngine is a fast symbolic manipulation library",
"homepage": "https://github.com/symengine/symengine", "homepage": "https://github.com/symengine/symengine",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View File

@ -722,6 +722,7 @@ memorymodule:x64-android=fail
# Missing dependent libraries. # Missing dependent libraries.
mesa:x64-linux=fail mesa:x64-linux=fail
mesa:x64-osx=fail mesa:x64-osx=fail
mesa:arm64-osx=fail
mfx-dispatch:arm-neon-android=fail mfx-dispatch:arm-neon-android=fail
mfx-dispatch:arm64-android=fail mfx-dispatch:arm64-android=fail
mfx-dispatch:x64-android=fail mfx-dispatch:x64-android=fail

View File

@ -33,7 +33,7 @@
"polly", "polly",
"utils" "utils"
], ],
"platform": "!static" "platform": "!static & !x86"
}, },
{ {
"$comment": "Platform restriction due to CI artifact upload quirks; libc", "$comment": "Platform restriction due to CI artifact upload quirks; libc",

View File

@ -3342,7 +3342,7 @@
}, },
"halide": { "halide": {
"baseline": "17.0.1", "baseline": "17.0.1",
"port-version": 0 "port-version": 1
}, },
"happly": { "happly": {
"baseline": "2021-03-19", "baseline": "2021-03-19",
@ -5405,8 +5405,8 @@
"port-version": 0 "port-version": 0
}, },
"llvm": { "llvm": {
"baseline": "17.0.2", "baseline": "18.1.6",
"port-version": 5 "port-version": 0
}, },
"lmdb": { "lmdb": {
"baseline": "0.9.31", "baseline": "0.9.31",
@ -5693,8 +5693,8 @@
"port-version": 3 "port-version": 3
}, },
"mesa": { "mesa": {
"baseline": "23.2.1", "baseline": "24.0.7",
"port-version": 1 "port-version": 0
}, },
"meschach": { "meschach": {
"baseline": "1.2b", "baseline": "1.2b",
@ -8526,7 +8526,7 @@
}, },
"symengine": { "symengine": {
"baseline": "0.11.2", "baseline": "0.11.2",
"port-version": 0 "port-version": 1
}, },
"systemc": { "systemc": {
"baseline": "2.3.3", "baseline": "2.3.3",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "cdced195e1ecb05af078e7d0ba4ba58106397330",
"version": "17.0.1",
"port-version": 1
},
{ {
"git-tree": "b85a941fbb39b69cf6e9b508a826fc87a90ff722", "git-tree": "b85a941fbb39b69cf6e9b508a826fc87a90ff722",
"version": "17.0.1", "version": "17.0.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "895e2d7c7c902213125eeed97cc5cf7eebc99b9d",
"version": "18.1.6",
"port-version": 0
},
{ {
"git-tree": "3782c35ec8e69e728302f4adeb98dd21d7452fce", "git-tree": "3782c35ec8e69e728302f4adeb98dd21d7452fce",
"version": "17.0.2", "version": "17.0.2",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "24210567cde1f9242bca62ba46ef468467281c80",
"version": "24.0.7",
"port-version": 0
},
{ {
"git-tree": "cf4f628acb3c66d2c99544f1acd2a76f576f3f4b", "git-tree": "cf4f628acb3c66d2c99544f1acd2a76f576f3f4b",
"version": "23.2.1", "version": "23.2.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "2f4153bc257d5c8b657a7b37b6d4933aeb61573c",
"version": "0.11.2",
"port-version": 1
},
{ {
"git-tree": "22024db6e6ebc5f1be7e351e9eecd6f1cb26783a", "git-tree": "22024db6e6ebc5f1be7e351e9eecd6f1cb26783a",
"version": "0.11.2", "version": "0.11.2",