Skip to content

Commit 54ac34a

Browse files
author
Peter Goodman
authored
Merge pull request #1015 from lifting-bits/update-vcpkg-llvm
Update vcpkg and LLVM
2 parents c32bc3a + b71b7df commit 54ac34a

14 files changed

+154
-85
lines changed

.github/workflows/vcpkg_ci_mac.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
echo "Selecting XCode Version ${{ matrix.os.xcode }}"
7979
sudo xcode-select -s /Applications/Xcode_${{ matrix.os.xcode }}.app/Contents/Developer
8080
81+
- name: Install latest LLVM
82+
run: |
83+
brew install llvm
84+
echo "/usr/local/opt/llvm/bin" >> "$GITHUB_PATH"
85+
8186
- name: Initialize vcpkg
8287
shell: bash
8388
run: |

build_dependencies.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if [[ -z "${CC+unset}" || -z "${CC}" ]]; then
102102
export CC="${CC:-$(which clang)}"
103103
msg "Using default clang as CC=${CC}"
104104
else
105-
msg "Using default C comiler"
105+
msg "Using default C compiler"
106106
fi
107107
else
108108
msg "Using custom CC=${CC}"
@@ -179,11 +179,11 @@ if [[ ${ASAN} == "true" ]]; then
179179
fi
180180

181181
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
182-
vcpkg_dir="${repo_dir:?}/vcpkg"
182+
vcpkg_dir=${repo_dir:?}/vcpkg
183183

184184
if [[ -z ${EXPORT_DIR} ]]; then
185185
# Set default export directory variable. Used for printing end message
186-
EXPORT_DIR="${vcpkg_dir}"
186+
EXPORT_DIR=${vcpkg_dir}
187187
fi
188188

189189
extra_vcpkg_args+=("--triplet=${target_triplet}" "--host-triplet=${host_triplet}" "--x-install-root=${EXPORT_DIR}/installed")
@@ -248,6 +248,11 @@ msg "Building dependencies"
248248
msg "Passing extra args to 'vcpkg install':"
249249
msg " " "${VCPKG_ARGS[@]}"
250250

251+
overlays=()
252+
if [ -f "${repo_dir}/overlays.txt" ] ; then
253+
readarray -t overlays < <(cat "${repo_dir}/overlays.txt")
254+
fi
255+
251256
# Check if we should upgrade ports
252257
if [[ ${UPGRADE_PORTS} == "true" ]]; then
253258
echo ""
@@ -256,14 +261,15 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
256261
cd "${repo_dir}"
257262
(
258263
set -x
259-
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run --allow-unsupported
264+
# shellcheck disable=SC2046
265+
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported
260266
)
261267
) || exit 1
262268
fi
263269

264-
dep_file='@dependencies.txt'
265-
if [ ! -f "${repo_dir}/dependencies.txt" ] ; then
266-
dep_file=''
270+
deps=()
271+
if [ -f "${repo_dir}/dependencies.txt" ] ; then
272+
readarray -t deps < <(cat "${repo_dir}/dependencies.txt")
267273
fi
268274

269275
# Run the vcpkg installation of our packages
@@ -272,7 +278,7 @@ fi
272278
(
273279
set -x
274280

275-
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' "${dep_file}" "${VCPKG_ARGS[@]}"
281+
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" "${overlays[@]}" "${deps[@]}" "${VCPKG_ARGS[@]}"
276282
)
277283
) || exit 1
278284

ports/llvm-15/vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"compiler-rt",
2626
"cxx-common-targets",
2727
"default-options",
28+
"lld",
2829
"mlir",
2930
"tools",
3031
"utils"

0 commit comments

Comments
 (0)