Skip to content

Commit 15a1f85

Browse files
authored
Update vcpkg and ports (#951)
* Update vcpkg to latest * Update Z3 * Fix build_dependencies.sh script to upgrade ports first before installing new ones * Manually download nuget for ARM64 runners * Update tools to latest commits * Build anvill on LLVM 14
1 parent b8a6992 commit 15a1f85

File tree

14 files changed

+56
-37
lines changed

14 files changed

+56
-37
lines changed

.github/workflows/vcpkg_ci_aws_amd64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
138138
"${{ secrets.GITHUB_TOKEN }}"
139139
140-
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build
140+
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build --debug
141141
142142
echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
143143
@@ -216,7 +216,7 @@ jobs:
216216
popd
217217
218218
- name: 'Anvill build'
219-
if: ${{ matrix.llvm == 'llvm-13' }}
219+
# if: ${{ matrix.llvm == 'llvm-13' }}
220220
shell: 'bash'
221221
run: |
222222
cd anvill

.github/workflows/vcpkg_ci_aws_arm64.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ jobs:
110110
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
111111
git clone "${vcpkg_repo_url}"
112112
git -C vcpkg checkout "${vcpkg_commit}"
113+
export "CMAKE_C_COMPILER_LAUNCHER=$(which ccache)"
114+
export "CMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)"
113115
./vcpkg/bootstrap-vcpkg.sh
114116
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV
115117
@@ -120,25 +122,30 @@ jobs:
120122
export VCPKG_FORCE_SYSTEM_BINARIES=1
121123
122124
# Setup NuGet authentication
123-
mono "$(${VCPKG_ROOT}/vcpkg fetch nuget | tail -n 1)" sources add \
125+
# Need to manually download nuget. Keep updated with URL listed in
126+
# https://github.com/microsoft/vcpkg/blob/master/scripts/vcpkgTools.xml
127+
export NUGET_EXE=/usr/local/bin/nuget
128+
curl -L https://dist.nuget.org/win-x86-commandline/v5.11.0/nuget.exe > "${NUGET_EXE}"
129+
chmod +x "${NUGET_EXE}"
130+
mono "${NUGET_EXE}" sources add \
124131
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
125132
-storepasswordincleartext \
126133
-name "Source" \
127134
-username "${{ github.repository_owner }}" \
128135
-password "${{ secrets.GITHUB_TOKEN }}" || true
129136
130-
mono "$(${VCPKG_ROOT}/vcpkg fetch nuget | tail -n 1)" sources update \
137+
mono "${NUGET_EXE}" sources update \
131138
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
132139
-storepasswordincleartext \
133140
-name "Source" \
134141
-username "${{ github.repository_owner }}" \
135142
-password "${{ secrets.GITHUB_TOKEN }}"
136143
137-
mono "$(${VCPKG_ROOT}/vcpkg fetch nuget | tail -n 1)" setapikey \
144+
mono "${NUGET_EXE}" setapikey \
138145
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
139146
"${{ secrets.GITHUB_TOKEN }}"
140147
141-
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build
148+
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build --debug
142149
143150
echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
144151
@@ -217,7 +224,7 @@ jobs:
217224
popd
218225
219226
- name: 'Anvill build'
220-
if: ${{ matrix.llvm == 'llvm-13' }}
227+
# if: ${{ matrix.llvm == 'llvm-13' }}
221228
shell: 'bash'
222229
run: |
223230
cd anvill

.github/workflows/vcpkg_ci_mac.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
9595
"${{ secrets.GITHUB_TOKEN }}"
9696
97-
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build
97+
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build --debug
9898
9999
echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
100100
@@ -182,7 +182,7 @@ jobs:
182182
183183
- name: 'Anvill build'
184184
shell: 'bash'
185-
if: ${{ matrix.llvm == 'llvm-13' }}
185+
#if: ${{ matrix.llvm == 'llvm-13' }}
186186
run: |
187187
cd anvill
188188
mkdir -p build && cd build

build_dependencies.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ msg "Boostrapping vcpkg"
198198
set -x
199199
if command -v ccache &> /dev/null
200200
then
201-
export CMAKE_C_COMPILER_LAUNCHER="$(which ccache)"
202-
export CMAKE_CXX_COMPILER_LAUNCHER="$(which ccache)"
201+
export "CMAKE_C_COMPILER_LAUNCHER=$(which ccache)"
202+
export "CMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)"
203203
fi
204204

205205
"${vcpkg_dir}/bootstrap-vcpkg.sh"
@@ -233,16 +233,6 @@ msg "Building dependencies"
233233
msg "Passing extra args to 'vcpkg install':"
234234
msg " " "${VCPKG_ARGS[@]}"
235235

236-
# Run the vcpkg installation of our packages
237-
(
238-
cd "${repo_dir}"
239-
(
240-
set -x
241-
242-
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' '@dependencies.txt' "${VCPKG_ARGS[@]}"
243-
)
244-
)
245-
246236
# Check if we should upgrade ports
247237
if [[ ${UPGRADE_PORTS} == "true" ]]; then
248238
echo ""
@@ -253,9 +243,19 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
253243
set -x
254244
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run --allow-unsupported
255245
)
256-
)
246+
) || exit 1
257247
fi
258248

249+
# Run the vcpkg installation of our packages
250+
(
251+
cd "${repo_dir}"
252+
(
253+
set -x
254+
255+
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' '@dependencies.txt' "${VCPKG_ARGS[@]}"
256+
)
257+
) || exit 1
258+
259259
echo ""
260260
msg "Investigate the following directory to discover all packages available to you:"
261261
msg " ${EXPORT_DIR}/installed/vcpkg"

ports/llvm-13/portfile.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ vcpkg_cmake_configure(
313313
${CROSS_OPTIONS}
314314
-DLLVM_INCLUDE_EXAMPLES=OFF
315315
-DLLVM_BUILD_EXAMPLES=OFF
316+
-DLLVM_INCLUDE_DOCS=OFF
317+
-DLLVM_BUILD_DOCS=OFF
316318
-DLLVM_INCLUDE_TESTS=OFF
317319
-DLLVM_BUILD_TESTS=OFF
318-
-DLLVM_BUILD_DOCS=OFF
319-
-DLLVM_INCLUDE_DOCS=OFF
320320
# Disable linking to Windows PDB analysis library (hard-coded path in LLVMExports.cmake)
321321
-DLLVM_ENABLE_DIA_SDK=OFF
322322
# Force TableGen to be built with optimization. This will significantly improve build time.

ports/llvm-13/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "llvm-13",
33
"version": "13.0.1",
4-
"port-version": 5,
4+
"port-version": 6,
55
"description": "The LLVM Compiler Infrastructure.",
66
"homepage": "https://llvm.org",
77
"supports": "!uwp & !(arm & windows)",

ports/llvm-14/portfile.cmake

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
set(LLVM_VERSION "14.0.3")
1+
set(LLVM_VERSION "14.0.6")
22

33
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
44

55
vcpkg_from_github(
66
OUT_SOURCE_PATH SOURCE_PATH
77
REPO llvm/llvm-project
88
REF llvmorg-${LLVM_VERSION}
9-
SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
9+
SHA512 d64f97754c24f32deb5f284ebbd486b3a467978b7463d622f50d5237fff91108616137b4394f1d1ce836efa59bf7bec675b6dee257a79b241c15be52d4697460
1010
HEAD_REF master
1111
PATCHES
1212
0001-fix-install-tools-path.patch
@@ -21,6 +21,15 @@ vcpkg_from_github(
2121
0024-remove-elf_relocation-checks.patch
2222
)
2323

24+
string(REPLACE "." ";" VERSION_LIST ${LLVM_VERSION})
25+
list(GET VERSION_LIST 0 LLVM_VERSION_MAJOR)
26+
list(GET VERSION_LIST 1 LLVM_VERSION_MINOR)
27+
list(GET VERSION_LIST 2 LLVM_VERSION_PATCH)
28+
# Remove anything after the first patch number (removes suffix like `-rc3`)
29+
if("${LLVM_VERSION_PATCH}" MATCHES "^([0-9]+).*")
30+
set(LLVM_VERSION_PATCH "${CMAKE_MATCH_1}")
31+
endif()
32+
2433
vcpkg_check_features(
2534
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2635
FEATURES
@@ -151,7 +160,8 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES)
151160
# 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (LLVM_TOOLS_INSTALL_DIR=tools/llvm)
152161
# 2) Clang resource files are relocated from ./lib/clang/<version> to ./tools/llvm/lib/clang/<version> (see patch 0007-fix-compiler-rt-install-path.patch)
153162
# So, the relative path should be changed from ../lib/clang/<version> to ./lib/clang/<version>
154-
list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${LLVM_VERSION})
163+
# This needs to not include version suffixes like '-rc3'
164+
list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
155165
endif()
156166
if("clang-tools-extra" IN_LIST FEATURES)
157167
list(APPEND LLVM_ENABLE_PROJECTS "clang-tools-extra")
@@ -160,6 +170,7 @@ if("compiler-rt" IN_LIST FEATURES)
160170
list(APPEND LLVM_ENABLE_PROJECTS "compiler-rt")
161171
endif()
162172
if("flang" IN_LIST FEATURES)
173+
# Disable Flang on Windows (see http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html).
163174
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
164175
message(FATAL_ERROR "Building Flang with MSVC is not supported on x86. Disable it until issues are fixed.")
165176
endif()
@@ -292,6 +303,8 @@ vcpkg_cmake_configure(
292303
${CROSS_OPTIONS}
293304
-DLLVM_INCLUDE_EXAMPLES=OFF
294305
-DLLVM_BUILD_EXAMPLES=OFF
306+
-DLLVM_INCLUDE_DOCS=OFF
307+
-DLLVM_BUILD_DOCS=OFF
295308
-DLLVM_INCLUDE_TESTS=OFF
296309
-DLLVM_BUILD_TESTS=OFF
297310
-DLLVM_INCLUDE_BENCHMARKS=OFF

ports/llvm-14/vcpkg.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "llvm-14",
3-
"version": "14.0.3",
4-
"port-version": 4,
3+
"version": "14.0.6",
54
"description": "The LLVM Compiler Infrastructure.",
65
"homepage": "https://llvm.org",
76
"supports": "!uwp & !(arm & windows)",

ports/z3/portfile.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ vcpkg_add_to_path("${PYTHON3_DIR}")
55
vcpkg_from_github(
66
OUT_SOURCE_PATH SOURCE_PATH
77
REPO Z3Prover/z3
8-
REF z3-4.8.16
9-
SHA512 385f6e1ee075b9eadb5aad338657a81f518eef382b99ce623448a630b79f5d414ebccfd1bb5e959626f0b82ef54a5f20326814ae988b5688d51578de6fb69615
8+
REF z3-4.8.17
9+
SHA512 95517014ec1798c2552253dd5cde6f955896ab297a4f56294f4bc6f2c5428069015f513c6eb9a090a809cfcf4cb1cc38cc83818f19b5b1051e4e6c06f973747d
1010
HEAD_REF master
1111
PATCHES
1212
fix-install-path.patch

0 commit comments

Comments
 (0)