Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/vcpkg_ci_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
echo "Selecting XCode Version ${{ matrix.os.xcode }}"
sudo xcode-select -s /Applications/Xcode_${{ matrix.os.xcode }}.app/Contents/Developer

- name: Install latest LLVM
run: |
brew install llvm
echo "/usr/local/opt/llvm/bin" >> "$GITHUB_PATH"

- name: Initialize vcpkg
shell: bash
run: |
Expand Down
22 changes: 14 additions & 8 deletions build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if [[ -z "${CC+unset}" || -z "${CC}" ]]; then
export CC="${CC:-$(which clang)}"
msg "Using default clang as CC=${CC}"
else
msg "Using default C comiler"
msg "Using default C compiler"
fi
else
msg "Using custom CC=${CC}"
Expand Down Expand Up @@ -179,11 +179,11 @@ if [[ ${ASAN} == "true" ]]; then
fi

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

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

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

overlays=()
if [ -f "${repo_dir}/overlays.txt" ] ; then
readarray -t overlays < <(cat "${repo_dir}/overlays.txt")
fi

# Check if we should upgrade ports
if [[ ${UPGRADE_PORTS} == "true" ]]; then
echo ""
Expand All @@ -256,14 +261,15 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
cd "${repo_dir}"
(
set -x
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run --allow-unsupported
# shellcheck disable=SC2046
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported
)
) || exit 1
fi

dep_file='@dependencies.txt'
if [ ! -f "${repo_dir}/dependencies.txt" ] ; then
dep_file=''
deps=()
if [ -f "${repo_dir}/dependencies.txt" ] ; then
readarray -t deps < <(cat "${repo_dir}/dependencies.txt")
fi

# Run the vcpkg installation of our packages
Expand All @@ -272,7 +278,7 @@ fi
(
set -x

"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' "${dep_file}" "${VCPKG_ARGS[@]}"
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" "${overlays[@]}" "${deps[@]}" "${VCPKG_ARGS[@]}"
)
) || exit 1

Expand Down
1 change: 1 addition & 0 deletions ports/llvm-15/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"compiler-rt",
"cxx-common-targets",
"default-options",
"lld",
"mlir",
"tools",
"utils"
Expand Down
Loading