From a60d907e11cbf283600d0dc49ebf044b915ac602 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Wed, 18 May 2022 12:49:16 +0200 Subject: [PATCH 01/25] ports: Add remill port. --- ports/remill/portfile.cmake | 27 +++++++++++++++++++++++++++ ports/remill/remill_usage | 4 ++++ ports/remill/vcpkg.json | 24 ++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 ports/remill/portfile.cmake create mode 100644 ports/remill/remill_usage create mode 100644 ports/remill/vcpkg.json diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake new file mode 100644 index 00000000..53df97b6 --- /dev/null +++ b/ports/remill/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lifting-bits/remill + REF 3de75e999299c6b7a071febfd1e74271c7004adc + SHA512 d2d9aa1762ac2c866b2788c842afabf25ce91bb6bc92870b74362fb0e698a49f8949625026e185d4b7d161b2eee051e4f7ed19a6e023139239829d6266f7a0aa + HEAD_REF vcpkg-manifest +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_cmake_config_fixup() + +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) + +file( + INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) + +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" RENAME usage) +endif() diff --git a/ports/remill/remill_usage b/ports/remill/remill_usage new file mode 100644 index 00000000..7185e4e6 --- /dev/null +++ b/ports/remill/remill_usage @@ -0,0 +1,4 @@ +The package remill provides CMake targets: + + find_package(remill CONFIG REQUIRED) + target_link_libraries(main PRIVATE remill) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json new file mode 100644 index 00000000..2fd09235 --- /dev/null +++ b/ports/remill/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "remill", + "version": "5.0.2", + "port-version": 1, + "description": "A static binary translator.", + "homepage": "https://github.com/lifting-bits/remill", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake-config", + "host": true + }, + "glog", + "gflags", + "xed", + { + "name": "llvm-14", + "default-features": false, + "features": [ + "cxx-common-targets" + ] + } + ] +} From c5852883a32a2688d10c4e1debb479f42db373ac Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Wed, 18 May 2022 12:49:53 +0200 Subject: [PATCH 02/25] ports: Add gap library. --- ports/gap/gap_usage | 4 ++++ ports/gap/portfile.cmake | 30 ++++++++++++++++++++++++++++++ ports/gap/vcpkg.json | 14 ++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 ports/gap/gap_usage create mode 100644 ports/gap/portfile.cmake create mode 100644 ports/gap/vcpkg.json diff --git a/ports/gap/gap_usage b/ports/gap/gap_usage new file mode 100644 index 00000000..a41f7dd6 --- /dev/null +++ b/ports/gap/gap_usage @@ -0,0 +1,4 @@ +The package gap provides CMake targets: + + find_package(gap CONFIG REQUIRED) + target_link_libraries(main PRIVATE gap::gap gap::gap-core gap::gap-settings) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake new file mode 100644 index 00000000..27a4562d --- /dev/null +++ b/ports/gap/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lifting-bits/gap + REF 11989486fa95db0f66fb339fad485f5b6cb725c2 + SHA512 acce919437fbb0fc7aed346514aafcd1772468a23838f2208494403edaf7afbb02396d5546ce18cb50b955b1d24569f2b83e3f8e5b8a6413e54985f3273e537d + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DGAP_ENABLE_COROUTINES=OFF + -DGAP_INSTALL=ON +) + +vcpkg_install_cmake() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/gap) + +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) + +file( + INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) + +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" RENAME usage) +endif() diff --git a/ports/gap/vcpkg.json b/ports/gap/vcpkg.json new file mode 100644 index 00000000..2344c690 --- /dev/null +++ b/ports/gap/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "gap", + "version": "0.0.0", + "port-version": 1, + "description": "A utility library to bridge llvm and mlir gaps", + "homepage": "https://github.com/lifting-bits/gap", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From 2371c3cbf5d1e5030325b6086fb9ff98512bb95c Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Fri, 20 May 2022 12:54:24 +0200 Subject: [PATCH 03/25] ports: Add remill port features. --- ports/remill/vcpkg.json | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index 2fd09235..472753f2 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -12,12 +12,26 @@ }, "glog", "gflags", - "xed", - { - "name": "llvm-14", - "default-features": false, - "features": [ - "cxx-common-targets" + "gtest", + "xed" + ], + "default-features": [ + "cxx-common-llvm-14" + ], + "features": [ + "system-llvm": { + "description": "Build with system llvm" + }, + "cxx-common-llvm-14": { + "description": "Build with cxx-common llvm-14 port", + "dependencies": [ + { + "name": "llvm-14", + "default-features": false, + "features": [ + "cxx-common-targets" + ] + } ] } ] From 8796ce4b4fb9978bc3f58c135df841efdf949b7b Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Fri, 20 May 2022 15:11:44 +0200 Subject: [PATCH 04/25] ports: Fix remill features. --- ports/remill/vcpkg.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index 472753f2..0b691b72 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -18,7 +18,7 @@ "default-features": [ "cxx-common-llvm-14" ], - "features": [ + "features": { "system-llvm": { "description": "Build with system llvm" }, @@ -28,11 +28,9 @@ { "name": "llvm-14", "default-features": false, - "features": [ - "cxx-common-targets" - ] + "features": [ "cxx-common-targets" ] } ] } - ] + } } From 79cbb7d4387e484ff74271f89a9a40ebd529758c Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 11:50:40 +0200 Subject: [PATCH 05/25] ports: Fix redundent remill debug paths. --- ports/remill/portfile.cmake | 1 + ports/remill/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index 53df97b6..ea4bb523 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_install_cmake() vcpkg_cmake_config_fixup() file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) file( INSTALL "${SOURCE_PATH}/LICENSE" diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index 0b691b72..830bd815 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -17,7 +17,7 @@ ], "default-features": [ "cxx-common-llvm-14" - ], + ], "features": { "system-llvm": { "description": "Build with system llvm" From c0daa4a56b3bb15d6cb7d31d03276614e0eb48e5 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 12:11:23 +0200 Subject: [PATCH 06/25] ports: Update remill config paths. --- ports/remill/portfile.cmake | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index ea4bb523..bd62ad0d 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -12,17 +12,28 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_cmake_config_fixup() +vcpkg_cmake_config_fixup( + PACKAGE_NAME "remill" + CONFIG_PATH lib/cmake +) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) +if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" ) + file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" ) +endif() + file( INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright ) -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" RENAME usage) +if ( EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" ) + file( + INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" + RENAME usage + ) endif() From 86d7c5c70e01224b767b1d19c8d072d0c03872e8 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 12:15:45 +0200 Subject: [PATCH 07/25] ports: Update gap port file configs. --- ports/gap/portfile.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 27a4562d..2a587a26 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/gap - REF 11989486fa95db0f66fb339fad485f5b6cb725c2 - SHA512 acce919437fbb0fc7aed346514aafcd1772468a23838f2208494403edaf7afbb02396d5546ce18cb50b955b1d24569f2b83e3f8e5b8a6413e54985f3273e537d + REF 971ac626e49e5508f6b488661120bd8cacbc0e72 + SHA512 fe8422f0d7c695eca4f17b1252bdfa22fa612312dda570754ae3def4acaa61b65ee6ff9eb3de8758b051535164fee6b6f94135dfc061db628b8816d29bb856e4 HEAD_REF main ) @@ -15,9 +15,13 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/gap) +vcpkg_cmake_config_fixup( + PACKAGE_NAME "gap" + CONFIG_PATH lib/cmake +) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) file( INSTALL "${SOURCE_PATH}/LICENSE" @@ -26,5 +30,9 @@ file( ) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" RENAME usage) + file( + INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" + RENAME usage + ) endif() From adce86a490397efa593faec51098ebf55ab91c6d Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 14:58:29 +0200 Subject: [PATCH 08/25] ports: Don't build gap tests. --- ports/gap/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 2a587a26..34def796 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DGAP_ENABLE_COROUTINES=OFF + -DENABLE_TESTING=OFF -DGAP_INSTALL=ON ) From 9e3add98836a936a90596e8ced55f2e7f44c71e5 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 15:34:35 +0200 Subject: [PATCH 09/25] ports: Remove empty lib folder from gap port. --- ports/gap/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 34def796..a3af53be 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -24,6 +24,9 @@ vcpkg_cmake_config_fixup( file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) +# we do not populate lib folder yet +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" ) + file( INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" From ca5dbec16720e62eac0efed6366fbe776d94a97a Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 24 May 2022 16:22:02 +0200 Subject: [PATCH 10/25] ports: Add zlib to remill dependencies. --- ports/remill/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index 830bd815..ff0335b9 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -13,6 +13,7 @@ "glog", "gflags", "gtest", + "zlib", "xed" ], "default-features": [ From d30a83e9cc3ab267fef83f8c0b60bc64e4552438 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Wed, 25 May 2022 23:12:20 +0200 Subject: [PATCH 11/25] ports: Fix config install paths. --- ports/gap/portfile.cmake | 4 ++-- ports/remill/portfile.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index a3af53be..758b6bbd 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_cmake_config_fixup( PACKAGE_NAME "gap" - CONFIG_PATH lib/cmake + CONFIG_PATH lib/cmake/gap ) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) @@ -33,7 +33,7 @@ file( RENAME copyright ) -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage") +if ( EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" ) file( INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index bd62ad0d..16c3ce8c 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_cmake_config_fixup( PACKAGE_NAME "remill" - CONFIG_PATH lib/cmake + CONFIG_PATH lib/cmake/remill ) file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) From 839ba4e7c6fb645c06d9b91df66cc4d245d321a9 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Thu, 26 May 2022 14:58:18 +0200 Subject: [PATCH 12/25] ports: Bump up remill port. --- ports/remill/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index 16c3ce8c..dabaea34 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/remill - REF 3de75e999299c6b7a071febfd1e74271c7004adc - SHA512 d2d9aa1762ac2c866b2788c842afabf25ce91bb6bc92870b74362fb0e698a49f8949625026e185d4b7d161b2eee051e4f7ed19a6e023139239829d6266f7a0aa + REF e7c0e3f9f7f482b6bcc336cd98b8afd4129c6e3b + SHA512 49ee8db4dbf097e89046f3fce3de85ea35703d329f44b3388af992664760044aa8a9e7d0dac1c71e914b0fe0293f5ec10cc8ef4de5e5a118a492b6b2581b9b8c HEAD_REF vcpkg-manifest ) From 44e45e82ddbe3d361bde602236935eab00ad038d Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Wed, 8 Jun 2022 11:53:00 -0400 Subject: [PATCH 13/25] Various fixes --- ports/gap/portfile.cmake | 6 +++--- ports/gap/vcpkg.json | 7 +++++-- ports/remill/portfile.cmake | 7 ++++--- ports/remill/vcpkg.json | 5 ++++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 758b6bbd..ef4b5a44 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -6,16 +6,16 @@ vcpkg_from_github( HEAD_REF main ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - PREFER_NINJA OPTIONS -DGAP_ENABLE_COROUTINES=OFF -DENABLE_TESTING=OFF -DGAP_INSTALL=ON + -DUSE_SYSTEM_DEPENDENCIES=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_cmake_config_fixup( PACKAGE_NAME "gap" CONFIG_PATH lib/cmake/gap diff --git a/ports/gap/vcpkg.json b/ports/gap/vcpkg.json index 2344c690..f992b040 100644 --- a/ports/gap/vcpkg.json +++ b/ports/gap/vcpkg.json @@ -1,11 +1,14 @@ { "name": "gap", "version": "0.0.0", - "port-version": 1, "description": "A utility library to bridge llvm and mlir gaps", "homepage": "https://github.com/lifting-bits/gap", - "license": "MIT", + "license": "Apache-2.0", "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, { "name": "vcpkg-cmake-config", "host": true diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index dabaea34..70d814cc 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -6,12 +6,13 @@ vcpkg_from_github( HEAD_REF vcpkg-manifest ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - PREFER_NINJA + OPTIONS + -DUSE_SYSTEM_DEPENDENCIES=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_cmake_config_fixup( PACKAGE_NAME "remill" CONFIG_PATH lib/cmake/remill diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index ff0335b9..b425075d 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -1,11 +1,14 @@ { "name": "remill", "version": "5.0.2", - "port-version": 1, "description": "A static binary translator.", "homepage": "https://github.com/lifting-bits/remill", "license": "Apache-2.0", "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, { "name": "vcpkg-cmake-config", "host": true From c7b613e559135b5ab93eda4db2bd8b1bcb152a3d Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Thu, 14 Jul 2022 14:37:06 +0200 Subject: [PATCH 14/25] ports: bump up gap version --- ports/gap/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index ef4b5a44..3f56a843 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -1,16 +1,17 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/gap - REF 971ac626e49e5508f6b488661120bd8cacbc0e72 - SHA512 fe8422f0d7c695eca4f17b1252bdfa22fa612312dda570754ae3def4acaa61b65ee6ff9eb3de8758b051535164fee6b6f94135dfc061db628b8816d29bb856e4 + REF 62954efaf660991ee489394f238ffa1ae82f5f72 + SHA512 75148940a9c9888085533176eb29e4a4efa1859bf8a18316c7ae8dc4a7b1918c1077d30662db51e2abe1fd1f4ae3e6369060dafbdcd01e06655efd48db95f155 HEAD_REF main ) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DGAP_ENABLE_COROUTINES=OFF - -DENABLE_TESTING=OFF + -DGAP_ENABLE_COROUTINES=ON + -DGAP_ENABLE_TESTING=OFF + -DGAP_ENABLE_EXAMPLES=OFF -DGAP_INSTALL=ON -DUSE_SYSTEM_DEPENDENCIES=ON ) @@ -21,8 +22,7 @@ vcpkg_cmake_config_fixup( CONFIG_PATH lib/cmake/gap ) -file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" ) -file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" ) +file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" ) # we do not populate lib folder yet file( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" ) From e2c32b1012cd552439ac888bfc1ac54e90c67e21 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Fri, 29 Jul 2022 15:55:31 -0400 Subject: [PATCH 15/25] Fix usage file Previously, vcpkg would ignore it and just print the heuristically generated usage. --- ports/gap/portfile.cmake | 11 ++++------- ports/gap/{gap_usage => usage} | 0 ports/remill/portfile.cmake | 11 ++++------- ports/remill/{remill_usage => usage} | 0 4 files changed, 8 insertions(+), 14 deletions(-) rename ports/gap/{gap_usage => usage} (100%) rename ports/remill/{remill_usage => usage} (100%) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 3f56a843..9939e82a 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -33,10 +33,7 @@ file( RENAME copyright ) -if ( EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" ) - file( - INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" - RENAME usage - ) -endif() +file( + INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) diff --git a/ports/gap/gap_usage b/ports/gap/usage similarity index 100% rename from ports/gap/gap_usage rename to ports/gap/usage diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index 70d814cc..9906def6 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -31,10 +31,7 @@ file( RENAME copyright ) -if ( EXISTS "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" ) - file( - INSTALL "${CMAKE_CURRENT_LIST_DIR}/${lower_package}_usage" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${lower_package}" - RENAME usage - ) -endif() +file( + INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) diff --git a/ports/remill/remill_usage b/ports/remill/usage similarity index 100% rename from ports/remill/remill_usage rename to ports/remill/usage From a3d9751cc1b59598770bc4739abb3cf60d9650ff Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Wed, 3 Aug 2022 16:31:38 +0200 Subject: [PATCH 16/25] ports: bump up gap port --- ports/gap/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 9939e82a..6240292f 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/gap - REF 62954efaf660991ee489394f238ffa1ae82f5f72 - SHA512 75148940a9c9888085533176eb29e4a4efa1859bf8a18316c7ae8dc4a7b1918c1077d30662db51e2abe1fd1f4ae3e6369060dafbdcd01e06655efd48db95f155 + REF 64e5ceb07ab7eb0478af3f49783719b8fb8d2d7e + SHA512 01d9e0c5145ebb8104555f37c3ccaae63a2dba3cae58d07a7a50622ac16dd6f584d44d549b97013fbd70426f819e7e63ec49d9eb0e8dc337499842875220763e HEAD_REF main ) From 7c8412eacf2be550154bfa4958ec738968448cb6 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Mon, 8 Aug 2022 23:45:21 +0200 Subject: [PATCH 17/25] ports: bump up remill --- ports/remill/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index 9906def6..c6b7abac 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/remill - REF e7c0e3f9f7f482b6bcc336cd98b8afd4129c6e3b - SHA512 49ee8db4dbf097e89046f3fce3de85ea35703d329f44b3388af992664760044aa8a9e7d0dac1c71e914b0fe0293f5ec10cc8ef4de5e5a118a492b6b2581b9b8c + REF 6752679638d04400e26b91efb9c5641b93d4df52 + SHA512 b4c7ba1edb04c23d13ec62d5ec02c620dcc32c93efaf2b1dbd2a2865db55d3e77a7f275e195710d23cc79fb44d43e2c5184f1845c70de3376b78f1303aaaa144 HEAD_REF vcpkg-manifest ) From 68147047cf4ae0bff99dbed768de805419b57ca4 Mon Sep 17 00:00:00 2001 From: Lukas Korencik Date: Fri, 23 Jun 2023 17:34:01 +0200 Subject: [PATCH 18/25] ports: Bump remill. --- ports/remill/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index c6b7abac..37a60fdb 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -1,9 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/remill - REF 6752679638d04400e26b91efb9c5641b93d4df52 - SHA512 b4c7ba1edb04c23d13ec62d5ec02c620dcc32c93efaf2b1dbd2a2865db55d3e77a7f275e195710d23cc79fb44d43e2c5184f1845c70de3376b78f1303aaaa144 - HEAD_REF vcpkg-manifest + REF 36b1901eacb1564f62c8fe9205b59825a03e3ae2 + SHA512 0c8d5bd8bd291adb9ea369574fee7a8a3629e12030270da77f541d1d8b531ce1305d061616c582ec734ee8ee7ba917ab0e3a1e688204aab4b486360fb5adb814 + HEAD_REF vcpkg-manifest-llvm-16 ) vcpkg_cmake_configure( From 8a6507fd1344c0a955539bd6c558f9c99b867a9d Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Sat, 24 Jun 2023 10:02:19 +0200 Subject: [PATCH 19/25] ports: bump up default llvm version to 16 for remill --- ports/remill/vcpkg.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index b425075d..2855574d 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -20,17 +20,17 @@ "xed" ], "default-features": [ - "cxx-common-llvm-14" + "cxx-common-llvm-16" ], "features": { "system-llvm": { "description": "Build with system llvm" }, - "cxx-common-llvm-14": { - "description": "Build with cxx-common llvm-14 port", + "cxx-common-llvm-16": { + "description": "Build with cxx-common llvm-16 port", "dependencies": [ { - "name": "llvm-14", + "name": "llvm-16", "default-features": false, "features": [ "cxx-common-targets" ] } From 18adef47d169dbe8b7aff0707febe846adcdf41e Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Sat, 24 Jun 2023 10:58:20 +0200 Subject: [PATCH 20/25] vcpkg: bump up remill portfile hash --- ports/remill/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/remill/portfile.cmake b/ports/remill/portfile.cmake index 37a60fdb..f7f9901d 100644 --- a/ports/remill/portfile.cmake +++ b/ports/remill/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/remill - REF 36b1901eacb1564f62c8fe9205b59825a03e3ae2 + REF 2c41ce9dd16d46139634ce340410bddec77920b4 SHA512 0c8d5bd8bd291adb9ea369574fee7a8a3629e12030270da77f541d1d8b531ce1305d061616c582ec734ee8ee7ba917ab0e3a1e688204aab4b486360fb5adb814 HEAD_REF vcpkg-manifest-llvm-16 ) From dbc72e0f4eed07674d380a0e3c0762ff33c8d8ba Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Tue, 27 Jun 2023 15:42:53 +0200 Subject: [PATCH 21/25] ports: bump up remill version decription --- ports/remill/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/remill/vcpkg.json b/ports/remill/vcpkg.json index 2855574d..28f728ea 100644 --- a/ports/remill/vcpkg.json +++ b/ports/remill/vcpkg.json @@ -1,6 +1,6 @@ { "name": "remill", - "version": "5.0.2", + "version": "5.0.7", "description": "A static binary translator.", "homepage": "https://github.com/lifting-bits/remill", "license": "Apache-2.0", From 1965d3a99e071388a75315ee0cdf0edc0f5eb777 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Tue, 11 Jul 2023 11:12:29 -0400 Subject: [PATCH 22/25] Improve port upgrading experience (#1027) Only upgrade ports that are specified. Also, ask the user if they're sure they want to upgrade. It should prevent accidentally deleting/rebuilding LLVM if it's out of date or if trying to upgrade a port it depends on. --- README.md | 2 ++ build_dependencies.sh | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33b59a9c..b2e20e64 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,8 @@ See [the vcpkg docs](https://github.com/microsoft/vcpkg/blob/master/docs/example Installing additional dependencies will not update any existing dependencies by default. We do not update/upgrade by default because this could cause unexpected rebuilds that could potentially take hours (in the case of LLVM). To update dependencies, pass the `--upgrade-ports` option to the build script along with the respective options affecting vcpkg triplet selection (like `--release`). +You must specify the exact package/ports you want to upgrade. If the port does not exist, this will fail. + ## Useful manual vcpkg commands Sometimes it is useful to run vcpkg commands manually for testing a single package. Ideally, someone who wants to do this would read the [vcpkg documentation](https://github.com/microsoft/vcpkg/tree/master/docs), but below we list some commonly used commands. Inspecting the output of the build script will also show all of the vcpkg commands executed. diff --git a/build_dependencies.sh b/build_dependencies.sh index eec53be3..58d696f6 100755 --- a/build_dependencies.sh +++ b/build_dependencies.sh @@ -82,7 +82,7 @@ while [[ $# -gt 0 ]] ; do esac shift done -msg "Passing extra args to 'vcpkg install':" +msg "Passing extra args to vcpkg:" msg " " "${VCPKG_ARGS[@]}" function die_if_not_installed { @@ -237,10 +237,19 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then cd "${repo_dir}" ( set -x - # shellcheck disable=SC2046 - "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported + "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --allow-unsupported "${VCPKG_ARGS[@]}" || true + + set +x + read -p "Are you sure? If so, enter 'y' " -n 1 -r + echo "" + if [[ $REPLY =~ ^[Yy]$ ]] + then + set -x + "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported "${VCPKG_ARGS[@]}" || exit 1 + fi ) - ) || exit 1 + ) + exit 0 fi deps=() From 29847688c0d51c3bd537a1e1dd60db9689a05706 Mon Sep 17 00:00:00 2001 From: Brent Pappas Date: Tue, 18 Jul 2023 19:23:28 -0400 Subject: [PATCH 23/25] Combine unknown attrs annotate and attr type attrs (#1028) - Replace patch `0027-unknown-attrs-as-annotations.patch` with a new patch that also adds the method `AttributedType::getAttr()` to get the type that an `AttributedType` instance is attributed with. - Update `ports/llvm-16/portfile.cmake` to reflect this change. --- .../0027-unknown-attrs-as-annotations.patch | 198 --------- ...sAsAnnotate-and-AttributedType-Attrs.patch | 389 ++++++++++++++++++ ports/llvm-16/portfile.cmake | 2 +- 3 files changed, 390 insertions(+), 199 deletions(-) delete mode 100644 ports/llvm-16/0027-unknown-attrs-as-annotations.patch create mode 100644 ports/llvm-16/0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch diff --git a/ports/llvm-16/0027-unknown-attrs-as-annotations.patch b/ports/llvm-16/0027-unknown-attrs-as-annotations.patch deleted file mode 100644 index 5a006813..00000000 --- a/ports/llvm-16/0027-unknown-attrs-as-annotations.patch +++ /dev/null @@ -1,198 +0,0 @@ -From b3b2b93d3d0e28e2d1269c3fcbb8a509c2331858 Mon Sep 17 00:00:00 2001 -From: Peter Goodman -Date: Fri, 24 Mar 2023 16:58:52 -0400 -Subject: [PATCH] Patches for supporting arbitrary attributes as annotation - attributes - ---- - clang/include/clang/Basic/LangOptions.def | 2 ++ - clang/include/clang/Driver/Options.td | 5 ++++ - clang/lib/Driver/ToolChains/Clang.cpp | 5 ++++ - clang/lib/Parse/ParseDeclCXX.cpp | 24 +++++++++------- - clang/lib/Sema/SemaDeclAttr.cpp | 25 ++++++++++++++-- - clang/lib/Sema/SemaType.cpp | 35 +++++++++++++++++++---- - 6 files changed, 77 insertions(+), 19 deletions(-) - -diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def -index d1cbe4306..4b2240d57 100644 ---- a/clang/include/clang/Basic/LangOptions.def -+++ b/clang/include/clang/Basic/LangOptions.def -@@ -311,6 +311,8 @@ LANGOPT(FastRelaxedMath , 1, 0, "OpenCL fast relaxed math") - BENIGN_LANGOPT(CLNoSignedZero , 1, 0, "Permit Floating Point optimization without regard to signed zeros") - COMPATIBLE_LANGOPT(CLUnsafeMath , 1, 0, "Unsafe Floating Point Math") - COMPATIBLE_LANGOPT(CLFiniteMathOnly , 1, 0, "__FINITE_MATH_ONLY__ predefined macro") -+ -+LANGOPT(UnknownAttrAnnotate, 1, 0, "Unknown attributes are treated as annotation or annotation type attributes during semantic analysis") - /// FP_CONTRACT mode (on/off/fast). - BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contraction type") - COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point") -diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td -index 652c15afc..64cb09a9a 100644 ---- a/clang/include/clang/Driver/Options.td -+++ b/clang/include/clang/Driver/Options.td -@@ -4377,6 +4377,11 @@ def working_directory : Separate<["-"], "working-directory">, Flags<[CC1Option]> - def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>, - Alias; - -+def funknown_attrs_as_annotate : Flag<["-"], "funknown-attrs-as-annotate">, -+ Flags<[CC1Option]>, -+ HelpText<"Treat unknown attributes as annotation or annotation type attributes in semantic analysis">, -+ MarshallingInfoFlag>; -+ - // Double dash options, which are usually an alias for one of the previous - // options. - -diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp -index ec6860113..02746500d 100644 ---- a/clang/lib/Driver/ToolChains/Clang.cpp -+++ b/clang/lib/Driver/ToolChains/Clang.cpp -@@ -4615,6 +4615,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, - } - } - -+ if (const Arg *A = Args.getLastArg(options::OPT_funknown_attrs_as_annotate)) { -+ CmdArgs.push_back("-funknown-attrs-as-annotate"); -+ A->claim(); -+ } -+ - if (IsOpenMPDevice) { - // We have to pass the triple of the host if compiling for an OpenMP device. - std::string NormalizedTriple = -diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp -index 227c1df2b..4d13a9b6a 100644 ---- a/clang/lib/Parse/ParseDeclCXX.cpp -+++ b/clang/lib/Parse/ParseDeclCXX.cpp -@@ -4368,18 +4368,22 @@ bool Parser::ParseCXX11AttributeArgs( - Syntax = ParsedAttr::AS_Microsoft; - } - -+ - // If the attribute isn't known, we will not attempt to parse any -- // arguments. -- if (Syntax != ParsedAttr::AS_Microsoft && -- !hasAttribute(LO.CPlusPlus ? AttributeCommonInfo::Syntax::AS_CXX11 -- : AttributeCommonInfo::Syntax::AS_C2x, -- ScopeName, AttrName, getTargetInfo(), getLangOpts())) { -- if (getLangOpts().MicrosoftExt || getLangOpts().HLSL) { -+ // arguments. Unless we are treating unknown attributes as annotation -+ // attributes. -+ if (!getLangOpts().UnknownAttrAnnotate) { -+ if (Syntax != ParsedAttr::AS_Microsoft && -+ !hasAttribute(LO.CPlusPlus ? AttributeCommonInfo::Syntax::AS_CXX11 -+ : AttributeCommonInfo::Syntax::AS_C2x, -+ ScopeName, AttrName, getTargetInfo(), getLangOpts())) { -+ if (getLangOpts().MicrosoftExt || getLangOpts().HLSL) { -+ } -+ // Eat the left paren, then skip to the ending right paren. -+ ConsumeParen(); -+ SkipUntil(tok::r_paren); -+ return false; - } -- // Eat the left paren, then skip to the ending right paren. -- ConsumeParen(); -- SkipUntil(tok::r_paren); -- return false; - } - - if (ScopeName && (ScopeName->isStr("gnu") || ScopeName->isStr("__gnu__"))) { -diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp -index a303c7f57..228b54a61 100644 ---- a/clang/lib/Sema/SemaDeclAttr.cpp -+++ b/clang/lib/Sema/SemaDeclAttr.cpp -@@ -4285,6 +4285,21 @@ static void handleAnnotateAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - S.AddAnnotationAttr(D, AL, Str, Args); - } - -+static void -+handleUnknownAttrAsAnnotateAttr(Sema &S, Decl *D, const ParsedAttr &AL) { -+ // Get name of unknown attribute: -+ StringRef Str = AL.getAttrName()->getName(); -+ -+ llvm::SmallVector Args; -+ Args.reserve(AL.getNumArgs()); -+ for (unsigned Idx = 0; Idx < AL.getNumArgs(); Idx++) { -+ assert(!AL.isArgIdent(Idx)); -+ Args.push_back(AL.getArgAsExpr(Idx)); -+ } -+ -+ S.AddAnnotationAttr(D, AL, Str, Args); -+} -+ - static void handleAlignValueAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - S.AddAlignValueAttr(D, AL, AL.getArgAsExpr(0)); - } -@@ -8594,11 +8609,15 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, - // though they were unknown attributes. - if (AL.getKind() == ParsedAttr::UnknownAttribute || - !AL.existsInTarget(S.Context.getTargetInfo())) { -- S.Diag(AL.getLoc(), -- AL.isDeclspecAttribute() -+ if (S.getLangOpts().UnknownAttrAnnotate) { -+ handleUnknownAttrAsAnnotateAttr(S, D, AL); -+ } else { -+ S.Diag(AL.getLoc(), -+ AL.isDeclspecAttribute() - ? (unsigned)diag::warn_unhandled_ms_attribute_ignored - : (unsigned)diag::warn_unknown_attribute_ignored) -- << AL << AL.getRange(); -+ << AL << AL.getRange(); -+ } - return; - } - -diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp -index 8cb1ed28f..909ed3d74 100644 ---- a/clang/lib/Sema/SemaType.cpp -+++ b/clang/lib/Sema/SemaType.cpp -@@ -8287,6 +8287,24 @@ static void HandleMatrixTypeAttr(QualType &CurType, const ParsedAttr &Attr, - CurType = T; - } - -+static void HandleUnkownTypeAttrAsAnnotateTypeAttr(TypeProcessingState &State, -+ QualType &CurType, const ParsedAttr &PA) { -+ Sema &S = State.getSema(); -+ StringRef Str = PA.getAttrName()->getName(); -+ -+ llvm::SmallVector Args; -+ Args.reserve(PA.getNumArgs()); -+ for (unsigned Idx = 0; Idx < PA.getNumArgs(); Idx++) { -+ assert(!PA.isArgIdent(Idx)); -+ Args.push_back(PA.getArgAsExpr(Idx)); -+ } -+ if (!S.ConstantFoldAttrArgs(PA, Args)) -+ return; -+ auto *AnnotateTypeAttr = -+ AnnotateTypeAttr::Create(S.Context, Str, Args.data(), Args.size(), PA); -+ CurType = State.getAttributedType(AnnotateTypeAttr, CurType, CurType); -+} -+ - static void HandleAnnotateTypeAttr(TypeProcessingState &State, - QualType &CurType, const ParsedAttr &PA) { - Sema &S = State.getSema(); -@@ -8390,12 +8408,17 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, - - case ParsedAttr::UnknownAttribute: - if (attr.isStandardAttributeSyntax()) { -- state.getSema().Diag(attr.getLoc(), -- diag::warn_unknown_attribute_ignored) -- << attr << attr.getRange(); -- // Mark the attribute as invalid so we don't emit the same diagnostic -- // multiple times. -- attr.setInvalid(); -+ if (state.getSema().getLangOpts().UnknownAttrAnnotate) { -+ HandleUnkownTypeAttrAsAnnotateTypeAttr(state, type, attr); -+ attr.setUsedAsTypeAttr(); -+ } else { -+ state.getSema().Diag(attr.getLoc(), -+ diag::warn_unknown_attribute_ignored) -+ << attr << attr.getRange(); -+ // Mark the attribute as invalid so we don't emit the same diagnostic -+ // multiple times. -+ attr.setInvalid(); -+ } - } - break; - --- -2.39.0 - diff --git a/ports/llvm-16/0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch b/ports/llvm-16/0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch new file mode 100644 index 00000000..d594059f --- /dev/null +++ b/ports/llvm-16/0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch @@ -0,0 +1,389 @@ +From 32fbac48f39e9fc24263495de5ca0b7df2d4c366 Mon Sep 17 00:00:00 2001 +From: Brent Pappas +Date: Fri, 14 Jul 2023 14:34:09 -0400 +Subject: [PATCH] UnknownAttrsAsAnnotate and AttributedType Attrs + +- Adds the flag `funknown-attrs-as-annotate` to Clang to treat unknown + attributes as annotate attributes by default. +- Adds a an `const Attr *` field to `AttributedType` to store the actual + `Attr` that the type is attributed with, along with methods to access + it. + +Co-authored-by: Laura Bauman +--- + clang/include/clang/AST/ASTContext.h | 3 +- + clang/include/clang/AST/Type.h | 17 ++++++++-- + clang/include/clang/Basic/LangOptions.def | 2 ++ + clang/include/clang/Driver/Options.td | 5 +++ + clang/lib/AST/ASTContext.cpp | 22 +++++++------ + clang/lib/AST/ASTImporter.cpp | 4 ++- + clang/lib/AST/Type.cpp | 5 +-- + clang/lib/Driver/ToolChains/Clang.cpp | 5 +++ + clang/lib/Parse/ParseDeclCXX.cpp | 24 ++++++++------ + clang/lib/Sema/SemaDeclAttr.cpp | 25 +++++++++++++-- + clang/lib/Sema/SemaType.cpp | 38 ++++++++++++++++++----- + clang/lib/Sema/TreeTransform.h | 5 ++- + 12 files changed, 116 insertions(+), 39 deletions(-) + +diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h +index 023837192..6cd459359 100644 +--- a/clang/include/clang/AST/ASTContext.h ++++ b/clang/include/clang/AST/ASTContext.h +@@ -1582,7 +1582,8 @@ public: + QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST) const; + + QualType getAttributedType(attr::Kind attrKind, QualType modifiedType, +- QualType equivalentType) const; ++ QualType equivalentType, ++ const Attr *typeAttr = nullptr) const; + + QualType getBTFTagAttributedType(const BTFTypeTagAttr *BTFAttr, + QualType Wrapped); +diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h +index 180251d7f..670e6f20d 100644 +--- a/clang/include/clang/AST/Type.h ++++ b/clang/include/clang/AST/Type.h +@@ -56,6 +56,7 @@ + + namespace clang { + ++class Attr; + class BTFTypeTagAttr; + class ExtQuals; + class QualType; +@@ -4880,13 +4881,14 @@ public: + private: + friend class ASTContext; // ASTContext creates these + ++ const Attr *TypeAttr; + QualType ModifiedType; + QualType EquivalentType; + +- AttributedType(QualType canon, attr::Kind attrKind, QualType modified, +- QualType equivalent) ++ AttributedType(QualType canon, Kind attrKind, QualType modified, ++ QualType equivalent, const Attr *typeAttr = nullptr) + : Type(Attributed, canon, equivalent->getDependence()), +- ModifiedType(modified), EquivalentType(equivalent) { ++ TypeAttr(typeAttr), ModifiedType(modified), EquivalentType(equivalent) { + AttributedTypeBits.AttrKind = attrKind; + } + +@@ -4895,6 +4897,8 @@ public: + return static_cast(AttributedTypeBits.AttrKind); + } + ++ bool hasAttr() const { return TypeAttr != nullptr; } ++ const Attr *getAttr() const { return TypeAttr; } + QualType getModifiedType() const { return ModifiedType; } + QualType getEquivalentType() const { return EquivalentType; } + +@@ -4958,6 +4962,13 @@ public: + Profile(ID, getAttrKind(), ModifiedType, EquivalentType); + } + ++ static void Profile(llvm::FoldingSetNodeID &ID, const Attr *typeAttr, ++ QualType modified, QualType equivalent) { ++ ID.AddPointer(typeAttr); ++ ID.AddPointer(modified.getAsOpaquePtr()); ++ ID.AddPointer(equivalent.getAsOpaquePtr()); ++ } ++ + static void Profile(llvm::FoldingSetNodeID &ID, Kind attrKind, + QualType modified, QualType equivalent) { + ID.AddInteger(attrKind); +diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def +index d1cbe4306..4b2240d57 100644 +--- a/clang/include/clang/Basic/LangOptions.def ++++ b/clang/include/clang/Basic/LangOptions.def +@@ -311,6 +311,8 @@ LANGOPT(FastRelaxedMath , 1, 0, "OpenCL fast relaxed math") + BENIGN_LANGOPT(CLNoSignedZero , 1, 0, "Permit Floating Point optimization without regard to signed zeros") + COMPATIBLE_LANGOPT(CLUnsafeMath , 1, 0, "Unsafe Floating Point Math") + COMPATIBLE_LANGOPT(CLFiniteMathOnly , 1, 0, "__FINITE_MATH_ONLY__ predefined macro") ++ ++LANGOPT(UnknownAttrAnnotate, 1, 0, "Unknown attributes are treated as annotation or annotation type attributes during semantic analysis") + /// FP_CONTRACT mode (on/off/fast). + BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contraction type") + COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point") +diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td +index 652c15afc..64cb09a9a 100644 +--- a/clang/include/clang/Driver/Options.td ++++ b/clang/include/clang/Driver/Options.td +@@ -4377,6 +4377,11 @@ def working_directory : Separate<["-"], "working-directory">, Flags<[CC1Option]> + def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>, + Alias; + ++def funknown_attrs_as_annotate : Flag<["-"], "funknown-attrs-as-annotate">, ++ Flags<[CC1Option]>, ++ HelpText<"Treat unknown attributes as annotation or annotation type attributes in semantic analysis">, ++ MarshallingInfoFlag>; ++ + // Double dash options, which are usually an alias for one of the previous + // options. + +diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp +index 8054eb2e1..6fe6badff 100644 +--- a/clang/lib/AST/ASTContext.cpp ++++ b/clang/lib/AST/ASTContext.cpp +@@ -3203,10 +3203,11 @@ QualType ASTContext::getFunctionTypeWithExceptionSpec( + + // Might have a calling-convention attribute. + if (const auto *AT = dyn_cast(Orig)) +- return getAttributedType( +- AT->getAttrKind(), +- getFunctionTypeWithExceptionSpec(AT->getModifiedType(), ESI), +- getFunctionTypeWithExceptionSpec(AT->getEquivalentType(), ESI)); ++ return getAttributedType( ++ AT->getAttrKind(), ++ getFunctionTypeWithExceptionSpec(AT->getModifiedType(), ESI), ++ getFunctionTypeWithExceptionSpec(AT->getEquivalentType(), ESI), ++ AT->getAttr()); + + // Anything else must be a function type. Rebuild it with the new exception + // specification. +@@ -4765,11 +4766,14 @@ QualType ASTContext::getUnresolvedUsingType( + return QualType(newType, 0); + } + +-QualType ASTContext::getAttributedType(attr::Kind attrKind, +- QualType modifiedType, +- QualType equivalentType) const { ++QualType ASTContext::getAttributedType( ++ attr::Kind attrKind, QualType modifiedType, ++ QualType equivalentType, const Attr *typeAttr/* = nullptr */)const { + llvm::FoldingSetNodeID id; +- AttributedType::Profile(id, attrKind, modifiedType, equivalentType); ++ if (typeAttr) ++ AttributedType::Profile(id, typeAttr, modifiedType, equivalentType); ++ else ++ AttributedType::Profile(id, attrKind, modifiedType, equivalentType); + + void *insertPos = nullptr; + AttributedType *type = AttributedTypes.FindNodeOrInsertPos(id, insertPos); +@@ -4777,7 +4781,7 @@ QualType ASTContext::getAttributedType(attr::Kind attrKind, + + QualType canon = getCanonicalType(equivalentType); + type = new (*this, TypeAlignment) +- AttributedType(canon, attrKind, modifiedType, equivalentType); ++ AttributedType(canon, attrKind, modifiedType, equivalentType, typeAttr); + + Types.push_back(type); + AttributedTypes.InsertNode(type, insertPos); +diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp +index 6f367ef05..f6bbaef71 100644 +--- a/clang/lib/AST/ASTImporter.cpp ++++ b/clang/lib/AST/ASTImporter.cpp +@@ -1501,7 +1501,9 @@ ExpectedType ASTNodeImporter::VisitAttributedType(const AttributedType *T) { + return ToEquivalentTypeOrErr.takeError(); + + return Importer.getToContext().getAttributedType(T->getAttrKind(), +- *ToModifiedTypeOrErr, *ToEquivalentTypeOrErr); ++ *ToModifiedTypeOrErr, ++ *ToEquivalentTypeOrErr, ++ T->getAttr()); + } + + ExpectedType ASTNodeImporter::VisitTemplateTypeParmType( +diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp +index 54e62a193..290fe9d5f 100644 +--- a/clang/lib/AST/Type.cpp ++++ b/clang/lib/AST/Type.cpp +@@ -1158,7 +1158,7 @@ public: + return QualType(T, 0); + + return Ctx.getAttributedType(T->getAttrKind(), modifiedType, +- equivalentType); ++ equivalentType, T->getAttr()); + } + + QualType VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) { +@@ -1461,7 +1461,8 @@ struct SubstObjCTypeArgsVisitor + + // Rebuild the attributed type. + return Ctx.getAttributedType(newAttrType->getAttrKind(), +- newAttrType->getModifiedType(), newEquivType); ++ newAttrType->getModifiedType(), newEquivType, ++ newAttrType->getAttr()); + } + }; + +diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp +index 77554aa2c..e5b59cbe3 100644 +--- a/clang/lib/Driver/ToolChains/Clang.cpp ++++ b/clang/lib/Driver/ToolChains/Clang.cpp +@@ -4615,6 +4615,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, + } + } + ++ if (const Arg *A = Args.getLastArg(options::OPT_funknown_attrs_as_annotate)) { ++ CmdArgs.push_back("-funknown-attrs-as-annotate"); ++ A->claim(); ++ } ++ + if (IsOpenMPDevice) { + // We have to pass the triple of the host if compiling for an OpenMP device. + std::string NormalizedTriple = +diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp +index 227c1df2b..4d13a9b6a 100644 +--- a/clang/lib/Parse/ParseDeclCXX.cpp ++++ b/clang/lib/Parse/ParseDeclCXX.cpp +@@ -4368,18 +4368,22 @@ bool Parser::ParseCXX11AttributeArgs( + Syntax = ParsedAttr::AS_Microsoft; + } + ++ + // If the attribute isn't known, we will not attempt to parse any +- // arguments. +- if (Syntax != ParsedAttr::AS_Microsoft && +- !hasAttribute(LO.CPlusPlus ? AttributeCommonInfo::Syntax::AS_CXX11 +- : AttributeCommonInfo::Syntax::AS_C2x, +- ScopeName, AttrName, getTargetInfo(), getLangOpts())) { +- if (getLangOpts().MicrosoftExt || getLangOpts().HLSL) { ++ // arguments. Unless we are treating unknown attributes as annotation ++ // attributes. ++ if (!getLangOpts().UnknownAttrAnnotate) { ++ if (Syntax != ParsedAttr::AS_Microsoft && ++ !hasAttribute(LO.CPlusPlus ? AttributeCommonInfo::Syntax::AS_CXX11 ++ : AttributeCommonInfo::Syntax::AS_C2x, ++ ScopeName, AttrName, getTargetInfo(), getLangOpts())) { ++ if (getLangOpts().MicrosoftExt || getLangOpts().HLSL) { ++ } ++ // Eat the left paren, then skip to the ending right paren. ++ ConsumeParen(); ++ SkipUntil(tok::r_paren); ++ return false; + } +- // Eat the left paren, then skip to the ending right paren. +- ConsumeParen(); +- SkipUntil(tok::r_paren); +- return false; + } + + if (ScopeName && (ScopeName->isStr("gnu") || ScopeName->isStr("__gnu__"))) { +diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp +index a303c7f57..228b54a61 100644 +--- a/clang/lib/Sema/SemaDeclAttr.cpp ++++ b/clang/lib/Sema/SemaDeclAttr.cpp +@@ -4285,6 +4285,21 @@ static void handleAnnotateAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + S.AddAnnotationAttr(D, AL, Str, Args); + } + ++static void ++handleUnknownAttrAsAnnotateAttr(Sema &S, Decl *D, const ParsedAttr &AL) { ++ // Get name of unknown attribute: ++ StringRef Str = AL.getAttrName()->getName(); ++ ++ llvm::SmallVector Args; ++ Args.reserve(AL.getNumArgs()); ++ for (unsigned Idx = 0; Idx < AL.getNumArgs(); Idx++) { ++ assert(!AL.isArgIdent(Idx)); ++ Args.push_back(AL.getArgAsExpr(Idx)); ++ } ++ ++ S.AddAnnotationAttr(D, AL, Str, Args); ++} ++ + static void handleAlignValueAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + S.AddAlignValueAttr(D, AL, AL.getArgAsExpr(0)); + } +@@ -8594,11 +8609,15 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, + // though they were unknown attributes. + if (AL.getKind() == ParsedAttr::UnknownAttribute || + !AL.existsInTarget(S.Context.getTargetInfo())) { +- S.Diag(AL.getLoc(), +- AL.isDeclspecAttribute() ++ if (S.getLangOpts().UnknownAttrAnnotate) { ++ handleUnknownAttrAsAnnotateAttr(S, D, AL); ++ } else { ++ S.Diag(AL.getLoc(), ++ AL.isDeclspecAttribute() + ? (unsigned)diag::warn_unhandled_ms_attribute_ignored + : (unsigned)diag::warn_unknown_attribute_ignored) +- << AL << AL.getRange(); ++ << AL << AL.getRange(); ++ } + return; + } + +diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp +index 8cb1ed28f..7e60f4bce 100644 +--- a/clang/lib/Sema/SemaType.cpp ++++ b/clang/lib/Sema/SemaType.cpp +@@ -257,7 +257,8 @@ namespace { + QualType getAttributedType(Attr *A, QualType ModifiedType, + QualType EquivType) { + QualType T = +- sema.Context.getAttributedType(A->getKind(), ModifiedType, EquivType); ++ sema.Context.getAttributedType(A->getKind(), ModifiedType, EquivType, ++ A); + AttrsForTypes.push_back({cast(T.getTypePtr()), A}); + AttrsForTypesSorted = false; + return T; +@@ -8287,6 +8288,24 @@ static void HandleMatrixTypeAttr(QualType &CurType, const ParsedAttr &Attr, + CurType = T; + } + ++static void HandleUnkownTypeAttrAsAnnotateTypeAttr(TypeProcessingState &State, ++ QualType &CurType, const ParsedAttr &PA) { ++ Sema &S = State.getSema(); ++ StringRef Str = PA.getAttrName()->getName(); ++ ++ llvm::SmallVector Args; ++ Args.reserve(PA.getNumArgs()); ++ for (unsigned Idx = 0; Idx < PA.getNumArgs(); Idx++) { ++ assert(!PA.isArgIdent(Idx)); ++ Args.push_back(PA.getArgAsExpr(Idx)); ++ } ++ if (!S.ConstantFoldAttrArgs(PA, Args)) ++ return; ++ auto *AnnotateTypeAttr = ++ AnnotateTypeAttr::Create(S.Context, Str, Args.data(), Args.size(), PA); ++ CurType = State.getAttributedType(AnnotateTypeAttr, CurType, CurType); ++} ++ + static void HandleAnnotateTypeAttr(TypeProcessingState &State, + QualType &CurType, const ParsedAttr &PA) { + Sema &S = State.getSema(); +@@ -8390,12 +8409,17 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, + + case ParsedAttr::UnknownAttribute: + if (attr.isStandardAttributeSyntax()) { +- state.getSema().Diag(attr.getLoc(), +- diag::warn_unknown_attribute_ignored) +- << attr << attr.getRange(); +- // Mark the attribute as invalid so we don't emit the same diagnostic +- // multiple times. +- attr.setInvalid(); ++ if (state.getSema().getLangOpts().UnknownAttrAnnotate) { ++ HandleUnkownTypeAttrAsAnnotateTypeAttr(state, type, attr); ++ attr.setUsedAsTypeAttr(); ++ } else { ++ state.getSema().Diag(attr.getLoc(), ++ diag::warn_unknown_attribute_ignored) ++ << attr << attr.getRange(); ++ // Mark the attribute as invalid so we don't emit the same diagnostic ++ // multiple times. ++ attr.setInvalid(); ++ } + } + break; + +diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h +index 4244bbc1e..fbfff5404 100644 +--- a/clang/lib/Sema/TreeTransform.h ++++ b/clang/lib/Sema/TreeTransform.h +@@ -6995,9 +6995,8 @@ QualType TreeTransform::TransformAttributedType( + } + } + +- result = SemaRef.Context.getAttributedType(TL.getAttrKind(), +- modifiedType, +- equivalentType); ++ result = SemaRef.Context.getAttributedType(TL.getAttrKind(), modifiedType, ++ equivalentType, TL.getAttr()); + } + + AttributedTypeLoc newTL = TLB.push(result); +-- +2.34.1 + diff --git a/ports/llvm-16/portfile.cmake b/ports/llvm-16/portfile.cmake index 2cc0fac4..7b5cf4f3 100644 --- a/ports/llvm-16/portfile.cmake +++ b/ports/llvm-16/portfile.cmake @@ -23,8 +23,8 @@ if("pasta" IN_LIST FEATURES) SOURCE_PATH "${SOURCE_PATH}" PATCHES 0025-PASTA-patches.patch - 0027-unknown-attrs-as-annotations.patch 0028-Fixes-to-clang-s-tablegen-of-attributes.patch + 0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch ) endif() From fe6881839ee2de65fe33d0d054ef550d4b456447 Mon Sep 17 00:00:00 2001 From: William Tan <1284324+Ninja3047@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:01:08 -0400 Subject: [PATCH 24/25] Drop llvm-15 + ubuntu 20.04 and more (#1029) * Update vcpkg * bump rellic * bump anvill/remill * Cleanup NuGet cache to fix space error on runner * Use anvill patchable-ir-main --------- Co-authored-by: Eric Kilmer --- .github/workflows/vcpkg_ci_amd64.yml | 39 ++++++++++++++-------------- .github/workflows/vcpkg_ci_mac.yml | 29 +++++++++------------ anvill | 2 +- rellic | 2 +- remill | 2 +- vcpkg_info.txt | 2 +- 6 files changed, 35 insertions(+), 41 deletions(-) diff --git a/.github/workflows/vcpkg_ci_amd64.yml b/.github/workflows/vcpkg_ci_amd64.yml index abc44d74..e8de4284 100644 --- a/.github/workflows/vcpkg_ci_amd64.yml +++ b/.github/workflows/vcpkg_ci_amd64.yml @@ -39,9 +39,8 @@ jobs: matrix: image: # 'name' is Docker image name whereas 'os' is more generic - - { os: 'ubuntu', name: 'ubuntu-v2', tag: '20.04' } - { os: 'ubuntu', name: 'ubuntu-v2', tag: '22.04' } - llvm: [ 'llvm-15', 'llvm-16[pasta]', 'llvm-16' ] + llvm: [ 'llvm-16[pasta]', 'llvm-16' ] target_arch: [ 'x64', 'arm64' ] container: @@ -119,6 +118,12 @@ jobs: echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV echo "TARGET_TRIPLET=${{ matrix.target_arch }}-linux-rel" >> $GITHUB_ENV + - name: Cleanup NuGet + shell: 'bash' + run: | + du -sh ~/.nuget || true + rm -rf ~/.nuget || true + - name: Upload CMake logs on error if: failure() uses: actions/upload-artifact@v3 @@ -175,7 +180,7 @@ jobs: - name: 'Rellic build' shell: 'bash' working-directory: rellic - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + if: matrix.target_arch == 'x64' run: | # Does not compile with gcc export CC="$(which clang)" @@ -191,10 +196,10 @@ jobs: cmake --build build --target install - name: 'Rellic test' shell: 'bash' - working-directory: rellic/build - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + working-directory: rellic + if: matrix.target_arch == 'x64' run: | - ../scripts/roundtrip.py ./tools/rellic-decomp ../tests/tools/decomp "${VCPKG_ROOT}/installed/${TARGET_TRIPLET}/tools/llvm/clang" + cmake --build build --target test - name: 'Remill dependencies' shell: 'bash' @@ -211,11 +216,6 @@ jobs: if: matrix.target_arch == 'x64' working-directory: remill run: | - if [[ '${{ matrix.image.tag }}' == '20.04' ]]; then - # Remill uses C++20 concepts that aren't supported by gcc-9 in 20.04 - export CC="$(which clang)" - export CXX="$(which clang++)" - fi cmake -G Ninja \ -DCMAKE_VERBOSE_MAKEFILE=ON \ "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \ @@ -237,7 +237,7 @@ jobs: - name: 'Anvill build' shell: 'bash' working-directory: anvill - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + if: matrix.target_arch == 'x64' run: | # TODO: Does not support compilation with gcc export CC="$(which clang)" @@ -257,17 +257,16 @@ jobs: -S . -B build cmake --build build cmake --install build - # NOTE: This is an old test that doesn't make sense anymore - # Need to find some other way to run a smoketest - #- name: 'Anvill test' - # shell: 'bash' - # working-directory: anvill - # if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' - # run: | - # ./install/bin/anvill-decompile-spec --spec ../bin/Decompile/tests/specs/ret0.json --bc_out ./ret0.bc --ir_out ret0.ir + - name: 'Anvill test' + shell: 'bash' + working-directory: anvill + if: matrix.target_arch == 'x64' + run: | + cmake --build build --target test - name: Cache cleanup and reporting shell: 'bash' run: | rm -rf vcpkg/{buildtrees,installed,packages} ccache --show-stats + df -h diff --git a/.github/workflows/vcpkg_ci_mac.yml b/.github/workflows/vcpkg_ci_mac.yml index f8502dcf..00250189 100644 --- a/.github/workflows/vcpkg_ci_mac.yml +++ b/.github/workflows/vcpkg_ci_mac.yml @@ -37,7 +37,7 @@ jobs: matrix: os: - { runner: 'macos-12', xcode: '14.2' } - llvm: [ 'llvm-15', 'llvm-16[pasta]', 'llvm-16' ] + llvm: [ 'llvm-16[pasta]', 'llvm-16' ] target_arch: [ 'x64', 'arm64' ] runs-on: ${{ matrix.os.runner }} @@ -177,7 +177,7 @@ jobs: - name: 'Rellic build' shell: 'bash' working-directory: rellic - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + if: matrix.target_arch == 'x64' run: | cmake -G Ninja \ -DCMAKE_VERBOSE_MAKEFILE=ON \ @@ -191,11 +191,10 @@ jobs: cmake --install build - name: 'Rellic test' shell: 'bash' - working-directory: rellic/build - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + working-directory: rellic + if: matrix.target_arch == 'x64' run: | - # Test only should run when we're not cross compiling - ../scripts/roundtrip.py ./tools/rellic-decomp ../tests/tools/decomp "${VCPKG_ROOT}/installed/${TARGET_TRIPLET}/tools/llvm/clang" + cmake --build build --target test - name: 'Remill dependencies' shell: 'bash' @@ -234,7 +233,7 @@ jobs: - name: 'Anvill build' shell: 'bash' working-directory: anvill - if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' + if: matrix.target_arch == 'x64' run: | cmake -G Ninja \ -DCMAKE_VERBOSE_MAKEFILE=ON \ @@ -251,16 +250,12 @@ jobs: -S . -B build cmake --build build cmake --install build - - # NOTE: This is an old test that doesn't make sense anymore - # Need to find some other way to run a smoketest - #- name: 'Anvill test' - # shell: 'bash' - # working-directory: anvill - # # if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64' - # if: matrix.target_arch == 'x64' - # run: | - # ./install/bin/anvill-decompile-spec -spec ../bin/Decompile/tests/specs/ret0.json -bc_out ./ret0.bc -ir_out ret0.ir + - name: 'Anvill test' + shell: 'bash' + working-directory: anvill + if: matrix.target_arch == 'x64' + run: | + cmake --build build --target test - name: Cache cleanup and reporting shell: 'bash' diff --git a/anvill b/anvill index 232f78fb..9f3e1235 160000 --- a/anvill +++ b/anvill @@ -1 +1 @@ -Subproject commit 232f78fbc7487cdf3c4f7c73c9af496700602910 +Subproject commit 9f3e12353d4dc7e3e07e74a67882736f404396f9 diff --git a/rellic b/rellic index c516dccb..6226304d 160000 --- a/rellic +++ b/rellic @@ -1 +1 @@ -Subproject commit c516dccbc4f338ab4ad30a268da7e241ae9ebb13 +Subproject commit 6226304d78a142f61fa2866533383f111f9e8913 diff --git a/remill b/remill index 396e228e..a6abbb81 160000 --- a/remill +++ b/remill @@ -1 +1 @@ -Subproject commit 396e228e934bfa2536105927950fb80c19c518c9 +Subproject commit a6abbb818c3c523dfb806cf4e8a0211f3a8d56e4 diff --git a/vcpkg_info.txt b/vcpkg_info.txt index ff35e44a..53a4246e 100644 --- a/vcpkg_info.txt +++ b/vcpkg_info.txt @@ -1,2 +1,2 @@ https://github.com/trail-of-forks/vcpkg.git -fix-cross-compile-linux +cxx-common From 6db35b84b2f2e55f256ddf506af577ee43082fe5 Mon Sep 17 00:00:00 2001 From: Henrich Lauko Date: Fri, 15 Sep 2023 10:38:48 +0200 Subject: [PATCH 25/25] gap: bump up portfile --- ports/gap/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gap/portfile.cmake b/ports/gap/portfile.cmake index 6240292f..aa96eada 100644 --- a/ports/gap/portfile.cmake +++ b/ports/gap/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lifting-bits/gap - REF 64e5ceb07ab7eb0478af3f49783719b8fb8d2d7e - SHA512 01d9e0c5145ebb8104555f37c3ccaae63a2dba3cae58d07a7a50622ac16dd6f584d44d549b97013fbd70426f819e7e63ec49d9eb0e8dc337499842875220763e + REF ad8fefaf7235a9cd6670e272ca4487807ed81f8a + SHA512 9e9259fd4c3c96e31965613092f7dec9df5e236aa4ef9ac122378fe1708d4efd2fb6bd9837530e8474646dc3b0aa409781fd6f45fc28929d07bb54a95a072566 HEAD_REF main )