diff --git a/.github/workflows/vcpkg_ci_linux.yml b/.github/workflows/vcpkg_ci_linux.yml
index c8f8b2df..5bd2de29 100644
--- a/.github/workflows/vcpkg_ci_linux.yml
+++ b/.github/workflows/vcpkg_ci_linux.yml
@@ -15,14 +15,12 @@ on:
- 'docker/**'
- '.github/**'
- '**.md'
- - 'old/**'
- '!.github/workflows/vcpkg_ci_linux.yml'
push:
paths-ignore:
- 'docker/**'
- '.github/**'
- '**.md'
- - 'old/**'
- '!.github/workflows/vcpkg_ci_linux.yml'
tags-ignore:
- 'v*'
@@ -57,7 +55,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
env:
- ARTIFACT_NAME: vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_${{ matrix.llvm }}_${{ matrix.host.arch }}.tar.xz
+ ARTIFACT_NAME: vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_${{ matrix.llvm }}_${{ matrix.host.arch }}
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.host.triplet }}
steps:
@@ -76,29 +74,19 @@ jobs:
with:
submodules: recursive
- - name: Read vcpkg Info
- id: vcpkg_info
- shell: bash
- run: |
- { read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
- echo ::set-output name=repo_url::${vcpkg_repo_url}
- echo ::set-output name=commit::${vcpkg_commit}
-
- name: Clear prior vcpkg directory
run: |
rm -rf "${{ github.workspace }}/vcpkg"
- # Needed for caching the actual vcpkg executable
- - name: 'Restore from cache and install vcpkg'
- uses: lukka/run-vcpkg@v10.1
- with:
- vcpkgGitURL: ${{ steps.vcpkg_info.outputs.repo_url }}
- vcpkgGitCommitId: ${{ steps.vcpkg_info.outputs.commit }}
- appendedCacheKey: '${{ matrix.host.arch }}-${{ matrix.image.name }}-${{ matrix.image.tag }}-${{ matrix.host.arch }}-${{ matrix.llvm }}-clear'
- vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- setupOnly: true
+ - name: Initialize vcpkg
+ shell: bash
+ run: |
+ { read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
+ git clone "${vcpkg_repo_url}"
+ git -C vcpkg checkout "${vcpkg_commit}"
+ ./vcpkg/bootstrap-vcpkg.sh
+ echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV
- # Omit this step if using manifests
- name: 'vcpkg install dependencies'
shell: 'bash'
run: |
@@ -126,13 +114,9 @@ jobs:
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
"${{ secrets.GITHUB_TOKEN }}"
- ${VCPKG_ROOT}/vcpkg install \
- --triplet "${{ matrix.host.triplet }}" \
- --clean-after-build \
- --debug \
- ${{ matrix.llvm }} \
- @overlays.txt \
- @dependencies.txt
+ ./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build
+
+ echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
- name: 'Export Packages'
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
@@ -140,16 +124,13 @@ jobs:
run: |
apt-get update
apt-get install -y pixz
- if [ ${{ matrix.host.arch }} == "arm64" ] ; then
- export VCPKG_FORCE_SYSTEM_BINARIES=1
- fi
- ./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
+ tar --use-compress-program pixz -cf "${{ env.ARTIFACT_NAME }}.tar.xz" ./${{ env.ARTIFACT_NAME }}
- uses: actions/upload-artifact@v3
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
- name: ${{ env.ARTIFACT_NAME }}
- path: ${{ env.ARTIFACT_NAME }}
+ name: ${{ env.ARTIFACT_NAME }}.tar.xz
+ path: ${{ env.ARTIFACT_NAME }}.tar.xz
- name: Prepare ccache
id: ccache_prep
@@ -238,12 +219,12 @@ jobs:
github.event.release
uses: softprops/action-gh-release@v1
with:
- files: ${{ env.ARTIFACT_NAME }}
+ files: ${{ env.ARTIFACT_NAME }}.tar.xz
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
token: ${{ secrets.RELEASE_TOKEN }}
- name: Cache cleanup and reporting
shell: 'bash'
run: |
- rm -rf ${VCPKG_ROOT}/{buildtrees,installed,packages}
+ rm -rf vcpkg/{buildtrees,installed,packages}
ccache --show-stats
diff --git a/.github/workflows/vcpkg_ci_mac.yml b/.github/workflows/vcpkg_ci_mac.yml
index 55ed03c4..f4412caa 100644
--- a/.github/workflows/vcpkg_ci_mac.yml
+++ b/.github/workflows/vcpkg_ci_mac.yml
@@ -15,14 +15,12 @@ on:
- 'docker/**'
- '.github/**'
- '**.md'
- - 'old/**'
- '!.github/workflows/vcpkg_ci_mac.yml'
push:
paths-ignore:
- 'docker/**'
- '.github/**'
- '**.md'
- - 'old/**'
- '!.github/workflows/vcpkg_ci_mac.yml'
tags-ignore:
- 'v*'
@@ -44,7 +42,7 @@ jobs:
runs-on: ${{ matrix.os.runner }}
env:
- ARTIFACT_NAME: vcpkg_${{ matrix.os.runner }}_${{ matrix.llvm }}_xcode-${{ matrix.os.xcode }}_amd64.tar.xz
+ ARTIFACT_NAME: vcpkg_${{ matrix.os.runner }}_${{ matrix.llvm }}_xcode-${{ matrix.os.xcode }}_amd64
steps:
# Used to get commit message since PRs are on a merge commit
@@ -75,52 +73,42 @@ jobs:
echo "Selecting XCode Version ${{ matrix.os.xcode }}"
sudo xcode-select -s /Applications/Xcode_${{ matrix.os.xcode }}.app/Contents/Developer
- - name: Read vcpkg Info
- id: vcpkg_info
+ - name: Initialize vcpkg
shell: bash
run: |
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
- echo ::set-output name=repo_url::${vcpkg_repo_url}
- echo ::set-output name=commit::${vcpkg_commit}
+ git clone "${vcpkg_repo_url}"
+ git -C vcpkg checkout "${vcpkg_commit}"
+ ./vcpkg/bootstrap-vcpkg.sh
+ echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV
- # Needed for caching the actual vcpkg executable
- - name: 'Restore from cache and install vcpkg'
- uses: lukka/run-vcpkg@v10.1
- with:
- vcpkgGitURL: ${{ steps.vcpkg_info.outputs.repo_url }}
- vcpkgGitCommitId: ${{ steps.vcpkg_info.outputs.commit }}
- appendedCacheKey: '${{ matrix.os.runner }}-${{ matrix.os.xcode }}-${{ matrix.llvm }}-clear'
- setupOnly: true
-
- # Omit this step if using manifests
- name: 'vcpkg install dependencies'
shell: 'bash'
run: |
+ export VCPKG_DISABLE_METRICS=1
+ brew install bash ninja
+
# Setup NuGet authentication
mono "$(${VCPKG_ROOT}/vcpkg fetch nuget | tail -n 1)" setapikey \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
"${{ secrets.GITHUB_TOKEN }}"
- ${VCPKG_ROOT}/vcpkg install \
- --triplet "${TRIPLET}" \
- --clean-after-build \
- --debug \
- ${{ matrix.llvm }} \
- @overlays.txt \
- @dependencies.txt
+ ./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build
+
+ echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV
- name: 'Export Packages'
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
run: |
brew install pixz
- ./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
+ tar --use-compress-program pixz -cf "${{ env.ARTIFACT_NAME }}.tar.xz" ./${{ env.ARTIFACT_NAME }}
- uses: actions/upload-artifact@v3
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
- name: ${{ env.ARTIFACT_NAME }}
- path: ${{ env.ARTIFACT_NAME }}
+ name: ${{ env.ARTIFACT_NAME }}.tar.xz
+ path: ${{ env.ARTIFACT_NAME }}.tar.xz
- name: 'Install build dependencies'
shell: 'bash'
@@ -206,12 +194,12 @@ jobs:
github.event.release
uses: softprops/action-gh-release@v1
with:
- files: ${{ env.ARTIFACT_NAME }}
+ files: ${{ env.ARTIFACT_NAME }}.tar.xz
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
token: ${{ secrets.RELEASE_TOKEN }}
- name: Cache cleanup and reporting
shell: 'bash'
run: |
- rm -rf ${VCPKG_ROOT}/{buildtrees,installed,packages}
+ rm -rf vcpkg/{buildtrees,installed,packages}
ccache --show-stats
diff --git a/NUPKG.outdated.md b/NUPKG.outdated.md
deleted file mode 100644
index 0adaa301..00000000
--- a/NUPKG.outdated.md
+++ /dev/null
@@ -1,248 +0,0 @@
-# WARNING OLD and UNTESTED
-
-Proceed with caution as this likely won't work exactly anymore.
-
-# Dependency Management for Lifting-Bits
-
-This repo contains scripts and custom packaging definitions for dependencies used by the `lifting-bits` organization.
-
-The aim is to make dependency management easier and more reproducible by using [vcpkg](https://github.com/microsoft/vcpkg) to build and find the required libraries.
-
-Currently, we try to support pre-built `Release` build-type libraries for OSX and Linux Ubuntu 18.04 and 20.04.
-
-# Table of Contents
-
-* [How to use](#how-to-use)
- * [Required system dependencies](#required-system-dependencies)
- * [Bootstrap and pull pre\-built dependencies natively](#bootstrap-and-pull-pre-built-dependencies-natively)
- * [Example: Building remill](#example-building-remill)
- * [Download pre\-built dependency bundle](#download-pre-built-dependency-bundle)
- * [Example: Building remill](#example-building-remill-1)
- * [Building it ALL from source](#building-it-all-from-source)
- * [Using Docker Image](#using-docker-image)
-* [Common Issues](#common-issues)
- * [Packages aren't being found in NuGet](#packages-arent-being-found-in-nuget)
-
-# How to use
-
-If you want to download pre-built dependencies, you'll need to generate a [GitHub Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token). The permissions only require `read:packages` to download. Note the generated token, as you'll be using it where you see `GITHUB_TOKEN`.
-
-## Required system dependencies
-
-[Mono](https://www.mono-project.com/) is required for fetching pre-built packages from NuGet.
-
-Linux (Ubuntu):
-
-* `clang-10` is used as the compiler in CI and should be used when building locally if you want to pull down binaries from GitHub that match exactly to your OS/Compiler.
-
-```bash
-sudo apt-get update && sudo apt-get install --yes clang-10 lld-10
-export CC=clang-10 && export CXX=clang++-10
-```
-
-OSX:
-
-* We use the latest available (by Software Update) XCode clang compiler, which is automatically picked up by vcpkg during the build, so as long as you haven't manually overridden the default C and C++ compiler, you should be able to use the libraries built by CI.
-
-## Bootstrap and pull pre-built dependencies natively
-
-If on Ubuntu 18.04 or 20.04, remember to `export CC=clang-10 && export CXX=clang++-10`.
-
-WARNING: This will write your Github token in plain text to `~/.config/NuGet/NuGet.config`.
-
-```bash
-./pull_dependencies.sh ${GITHUB_USERNAME} ${GITHUB_TOKEN}
-```
-
-If all goes well, and you are running an updated version of Mac OSX 10.15 with default Apple Compiler, and Ubuntu 18.04 or Ubuntu 20.04 with `clang-10` set as `CC` and `CXX`, then you should see that NuGet will find matching, compatible packages to download instead of building everything from source:
-
-**Note:** pre-built libraries are only found while using the `x64-{osx,linux}-rel` vcpkg [triplet](https://vcpkg.readthedocs.io/en/latest/users/triplets/) because `Debug` builds of LLVM are too demanding of the freely available CI runners. See the next section for building all dependencies (both `Release` and `Debug` types) from source.
-
-Sample good output for finding and using pre-built libraries:
-
-```log
-[DEBUG] system(/usr/bin/mono /workspace/vcpkg/downloads/tools/nuget-5.5.1-linux/nuget.exe install /workspace/vcpkg/buildtrees/packages.config -OutputDirectory /workspace/vcpkg/packages -Source Source -ExcludeVersion -NoCache -PreRelease -DirectDownload -PackageSaveMode nupkg -Verbosity detailed -ForceEnglishOutput -NonInteractive)
-NuGet Version: 5.5.1.6542
-Feeds used:
- https://nuget.pkg.github.com/ekilmer/index.json
-
-Restoring NuGet package gflags_x64-linux-rel.2.2.2-0669208ed4e52ac76dcab743cc8159122e35a179.
- GET https://nuget.pkg.github.com/ekilmer/download/gflags_x64-linux-rel/2.2.2-0669208ed4e52ac76dcab743cc8159122e35a179/gflags_x64-linux-rel.2.2.2-0669208ed4e52ac76dcab743cc8159122e35a179.nupkg
- OK https://nuget.pkg.github.com/ekilmer/download/gflags_x64-linux-rel/2.2.2-0669208ed4e52ac76dcab743cc8159122e35a179/gflags_x64-linux-rel.2.2.2-0669208ed4e52ac76dcab743cc8159122e35a179.nupkg 492ms
-```
-
-### Example: Building remill
-
-:exclamation: **Still in the root of this repo:** :exclamation:
-
-```bash
-git clone --branch vcpkg https://github.com/ekilmer/remill.git
-cd remill
-mkdir build && cd build
-cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
- -DVCPKG_TARGET_TRIPLET=x64-linux-rel \
- -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../../vcpkg/scripts/buildsystems/vcpkg.cmake" \
- -DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
- -G Ninja \
- ..
-cmake --build .
-cmake --build . --target install
-cmake --build . --target test_dependencies
-env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test
-```
-
-These commands should be repeated in a similar manner for any other lifting-bits repositories.
-
-Change the `-DVCPKG_TARGET_TRIPLET=x64-linux-rel` to `x64-osx-rel` if on MacOS.
-
-**NOTE:** If you don't want to build the tools within this repo, you will need to modify the following line:
-
-```text
--DCMAKE_TOOLCHAIN_FILE="PATH_TO_THIS_REPO/vcpkg/scripts/buildsystems/vcpkg.cmake"
-```
-
-## Download pre-built dependency bundle
-
-If you are having trouble getting NuGet to find the correct packages automatically, you may also try to download a zipped archive of the dependencies.
-
-Check out the release artifacts or CI run artifacts for your OS and download the zip corresponding to the LLVM version you'd like. You will need 7zip to extract the contents.
-
-:exclamation: **NOTE:** :exclamation: If you are not using Ubuntu, you can still try to download the artifacts and experiment with whether they work. There are no guarantees that they will work or be stable (even if tests pass). The only way to ensure the best stability is by compiling everything yourself.
-
-### Example: Building remill
-
-Anywhere on your computer:
-
-```bash
-git clone --branch vcpkg https://github.com/ekilmer/remill.git
-cd remill
-mv ~/Downloads/vcpkg_ubuntu-18.04_llvm.7z .
-7z x vcpkg_ubuntu-18.04_llvm.7z
-mkdir build && cd build
-cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
- -DVCPKG_TARGET_TRIPLET=x64-linux-rel \
- -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../vcpkg_ubuntu-18.04_llvm/scripts/buildsystems/vcpkg.cmake" \
- -DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
- -G Ninja \
- ..
-cmake --build .
-cmake --build . --target install
-cmake --build . --target test_dependencies
-env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test
-```
-
-There is always a chance that some incompatibility with the pre-built libraries has crept in, so please post your errors along with all of your build steps and their outputs.
-
-Or, build everything yourself.
-
-## Building it ALL from source
-
-This is required for Linux distributions other than Ubuntu 18.04, 20.04, and MacOS; _or_ if you don't want to use the `clang-10` compiler to compile the dependencies on Linux.
-
-The build types produced by vcpkg are controlled through triplet files. The `x64-{linux,os}-rel` triplet stands for `64-bit`, `linux` or `mac` system, `Release` build type.
-
-By default, vcpkg will choose a triplet based on your system, however this builds both `Release` and `Debug` builds of all dependencies, including LLVM. Our `x64-{linux-osx}-rel` triplet is not chosen by default, and it is in fact a custom (["overlay"](https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/)) triplet that is in the `triplets` directory of this repo, therefore, we must specify it manually whenever we use vcpkg.
-
-Interestingly, triplets of different names (and configurations) can exist next to each other! However, if not using the default, you must specify which triplet (_universe_) of dependencies you want to build/link against.
-
-To build everything from source, including both `Release` and `Debug` build types, we can simply run the following (after checkout out the correct version of vcpkg), which should work on any vcpkg-supported OS:
-
-```bash
-$ ./vcpkg/bootstrap.sh
-$ ./vcpkg/vcpkg install \
- --debug \
- llvm-10 \
- @dependencies.txt
-```
-
-Where `@dependencies.txt` is a file that contains pre-populated, unchanging options and packages required to build the lifting tools. Feel free to inspect that file to get a better idea of what is happening.
-
-If you don't want to use the default triplet, specify it with `--triplet my-triplet`.
-
-Then, follow the same exact steps in [building remill](#example-building-remill) when pulling the pre-built dependencies.
-
-## Using Docker Image
-
-If you want to test in a Docker image, run the following to pull dependencies from GitHub NuGet:
-
-```bash
-cd docker
-docker build -t vcpkg-base -f Dockerfile.vcpkg .
-cd ..
-docker run --rm -t -i -v "$(pwd):/workspace" \
- -u $(id -u ${USER}):$(id -g ${USER}) \
- vcpkg-base ./pull_dependencies.sh ${GITHUB_USERNAME} ${GITHUB_TOKEN}
-```
-
-Note that you should rebuild a fresh Docker image frequently to make sure you obtain the latest versions of the supported system dependencies to better match what is being run in CI.
-
-You could also use the built Docker image and follow any of the other steps to download the built dependency bundle or build everything from source.
-
-# Common Issues
-
-If reading through this doesn't help solve your problem, please open an issue.
-
-## Packages aren't being found in NuGet
-
-Barring any authentication issues, a message like the following means that there is a hash mismatch between CI and your machine:
-
-```log
-NuGet Version: 5.5.1.6542
-Feeds used:
- https://nuget.pkg.github.com/ekilmer/index.json
-
-Restoring NuGet package gflags_x64-osx-rel.2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff.
- GET https://nuget.pkg.github.com/ekilmer/download/gflags_x64-osx-rel/2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff/gflags_x64-osx-rel.2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff.nupkg
- NotFound https://nuget.pkg.github.com/ekilmer/download/gflags_x64-osx-rel/2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff/gflags_x64-osx-rel.2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff.nupkg 173ms
-WARNING: Unable to find version '2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff' of package 'gflags_x64-osx-rel'.
- https://nuget.pkg.github.com/ekilmer/index.json: Package 'gflags_x64-osx-rel.2.2.2-53884e51813100affbbcfbb754b564c1d9b9ddff' is not found on source 'https://nuget.pkg.github.com/ekilmer/index.json'.
-```
-
-This could be due to a multitude of things, but you should make sure that you are on the same `vcpkg` commit SHA as CI, this repo is updated, and that you are running the most up-to-date build tools.
-
-Digging through the debug output of `vcpkg` and comparing it a CI run will also help to determine the source of difference. Take a look at this section:
-
-```log
-[DEBUG] -- Build files have been written to: /Users/ekilmer/src/vcpkg-lifting-ports/vcpkg/buildtrees/detect_compiler/x64-osx-rel-rel
-[DEBUG]
-[DEBUG] #COMPILER_HASH#40c9eb093940d44cb6e6c8c0a7250ac20ec886ff
-[DEBUG] #COMPILER_C_HASH#a1db5d1638032ae8a49d431642a4ca746775e749
-[DEBUG] #COMPILER_C_VERSION#12.0.0.12000032
-[DEBUG] #COMPILER_C_ID#AppleClang
-[DEBUG] #COMPILER_CXX_HASH#a1db5d1638032ae8a49d431642a4ca746775e749
-[DEBUG] #COMPILER_CXX_VERSION#12.0.0.12000032
-[DEBUG] #COMPILER_CXX_ID#AppleClang
-[DEBUG] CMake Warning:
-[DEBUG] Manually-specified variables were not used by the project:
-[DEBUG]
-[DEBUG] BUILD_SHARED_LIBS
-[DEBUG] CMAKE_INSTALL_BINDIR
-[DEBUG] CMAKE_INSTALL_LIBDIR
-[DEBUG] VCPKG_CRT_LINKAGE
-[DEBUG] VCPKG_PLATFORM_TOOLSET
-[DEBUG] VCPKG_SET_CHARSET_FLAG
-```
-
-or at a particular package that will list everything that is being hashed:
-
-```log
-[DEBUG] Detecting compiler hash for triplet x64-osx-rel: 40c9eb093940d44cb6e6c8c0a7250ac20ec886ff
-[DEBUG]
-[DEBUG] 0001-patch-dir.patch|3c679554b70cba5a5dee554a4f02cfe2bbdf5ea5
-[DEBUG] CONTROL|4466385d3bffb1cbc43efe55180e9151a12d7116
-[DEBUG] cmake|3.18.4
-[DEBUG] features|core
-[DEBUG] fix_cmake_config.patch|6c3f00dcb6091bd3ab95ca452e2f685a4dd75dce
-[DEBUG] portfile.cmake|4b0207c608f1a09352c16fa7c970f12fec1927e1
-[DEBUG] post_build_checks|2
-[DEBUG] triplet|f57366c9c4a491b55f09403f44ae663a8935f5f9-94be8c046f9e0595c199a36690d288f70945643b-40c9eb093940d44cb6e6c8c0a7250ac20ec886ff
-[DEBUG] vcpkg_configure_cmake|ae0a97eff7f218b68bc4ab1b4bd661107893803e
-[DEBUG] vcpkg_copy_pdbs|dbca2886a2490c948893c8250a2b40a3006cf7a9
-[DEBUG] vcpkg_fixup_cmake_targets|799f0da59bbd2e387502be06a30e3d43f2e89b49
-[DEBUG] vcpkg_from_git|f29cbe08f369138581e36c864f9d08465c840e23
-[DEBUG] vcpkg_from_github|70d537ee6afbd1e8d40cc7d4e27a263ea5a81213
-[DEBUG] vcpkg_install_cmake|75d1079d6f563d87d08c8c5f63b359377aa19a6e
-[DEBUG]
-```
-
-In the end, if you still can't get NuGet to work, try [downloading pre-built dependency bundle](#download-pre-built-dependency-bundle) or [building everything yourself](#building-it-all-from-source).
diff --git a/README.md b/README.md
index f37f9ca3..4119b30d 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Curated dependencies that are compatible with the [lifting-bits](https://github.
## Pre-built
-Every [release](https://github.com/lifting-bits/cxx-common/releases), we publish compressed archives of the pre-built dependencies built by [vcpkg](https://github.com/microsoft/vcpkg).
+Every [release](https://github.com/lifting-bits/cxx-common/releases), we publish compressed archives of the pre-built dependencies built by [vcpkg](https://github.com/microsoft/vcpkg) with the CMake `Release` build type.
We only officially support and test the libraries built for the OSs that appear in CI, which includes Ubuntu 18.04, 20.04, and Mac OS 11.
@@ -22,48 +22,42 @@ tar -xJf vcpkg_ubuntu-20.04_llvm-12_amd64.tar.xz
Will produce a directory, and then you'll have to set the following during your CMake configure command to use these dependencies!
```text
--DCMAKE_TOOLCHAIN_FILE="/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-rel
+-DCMAKE_TOOLCHAIN_FILE="<...>/vcpkg_ubuntu-20.04_llvm-12_amd64/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-rel
```
-or (if supported by the project's `CMakeLists.txt`)
-
-```text
--DVCPKG_ROOT=""
-```
+Replace `x64-linux-rel` with `x64-osx-rel` if using the macOS pre-built download.
## Building from source
-If you aren't running a supported operating system, or you just want to build it for fun, you can build everything from source using the `./build_dependencies.sh` script.
+If you aren't running a supported operating system, or you want to have dependencies with a build type other than `Release`, you can build everything from source using the `./build_dependencies.sh` script (pass `--help` to see available options).
-By default, the script will install the dependencies listed in `dependencies.txt`, which doesn't include an LLVM version, so passing an `llvm-12` string as an argument will actually be passed to `vcpkg install`. Any other strings are also passed to the `vcpkg install` command.
+By default, the script will install the dependencies listed in [`dependencies.txt`](./dependencies.txt), which doesn't include an LLVM version, so passing an `llvm-12` string as an argument will actually be passed to [`vcpkg install`](https://github.com/microsoft/vcpkg/blob/master/docs/examples/installing-and-using-packages.md#install). Any other strings not matching the script's own options are also passed to the `vcpkg install` command. Furthermore, without specifying any other build script options, vcpkg determine determine the best triplet for your operating system, which means building _both_ `Debug` and `Release` build types (see the [vcpkg triplet docs](https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md) for more info).
```bash
./build_dependencies.sh llvm-12
```
-You can pass `--help` to the script to look at all options.
+Note that vcpkg will use binary caching to store built dependency packages (usually at `~/.cache/vcpkg` or manually set with environment variable `VCPKG_DEFAULT_BINARY_CACHE`) so that upon reinstallation/rebuilding (re-running the script) you likely won't have to rebuild everything from scratch, unless the package itself has been updated, you are using a different vcpkg triplet, your compiler has been changed/update, or any of the vcpkg scripts have changed (updated vcpkg repo). If you'd like to turn off [binary caching](https://github.com/microsoft/vcpkg/blob/master/docs/users/binarycaching.md) (not recommended), then you can either pass `--no-binarycaching` to the build script after the main options listed in or add `-binarycaching` to the `VCPKG_FEATURE_FLAGS` environment variable.
-Note that vcpkg will use binary caching to store built dependency packages (usually at `~/.cache/vcpkg` or manually set with environment variable `VCPKG_DEFAULT_BINARY_CACHE`) so that upon reinstallation/building (re-running the script) you won't have to rebuild everything from scratch, unless the package itself has been updated, you are using a different vcpkg triplet, or any of the vcpkg scripts have changed (updated vcpkg repo). If you'd like to turn off binary caching (not recommended), then you can either pass `--no-binarycaching` to the build script after the main options listed in `--help` or add `-binarycaching` to the `VCPKG_FEATURE_FLAGS` environment variable.
-
-**ATTENTION**: If you are having issues it is best to start fresh. Delete all of the created `vcpkg` directory. If you have binary caching on and nothing has changed, then you should be able to reuse your previously built dependencies.
+**ATTENTION**: If you are having issues it is best to start fresh. Delete all of the created `vcpkg` directory. If you have binary caching on and nothing has changed, then you should be able to quickly reuse your previously built dependencies.
### Export Directories
-By default, vcpkg will install all of your dependencies to its own in-repo `installed` directory. Passing `--export-dir ` to the `./build_dependencies.sh` script, you can store the required dependencies in a separate directory. Otherwise, the built dependencies will be stored within the vcpkg repo directory itself (`vcpkg/installed` relative path if in the root of this repo). If you are not pulling the repo multiple times for each LLVM install, then separate export directories are required to keep track of different LLVM versions, since they cannot coexist within the same export (read: installation) directory.
-
-NOTE: You cannot install new packages to the export directory. However, you can continue to install new packages without rebuilding to vcpkg's installation directory and re-export them.
+Passing `--export-dir ` to the `./build_dependencies.sh` script, you can install the chosen dependencies in a separate directory. Otherwise, the built dependencies will be stored within the vcpkg repo directory itself (`vcpkg/installed` relative path if in the root of this repo). Separate export directories are required to keep track of different LLVM versions, since they cannot coexist within the same export (read: installation) directory.
```bash
-./build_dependencies.sh --export-dir vcpkg-llvm-12-install llvm-12
+./build_dependencies.sh --export-dir vcpkg-llvm-13-install llvm-13
```
-will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 12 and install into a local directory named `vcpkg-llvm-10-install`.
+will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 12 and install into a local directory named `vcpkg-llvm-13-install`.
-It is important to remember that because different LLVM installations cannot coexist, you must either use a separate export directory or you should remove `vcpkg/installed` directory before installing another version.
+Furthermore, you are able to install additional dependencies into an existing exported directory created by this script by setting the `--export-dir ` to the same path:
-### Updating
+```bash
+./build_dependencies.sh --release --export-dir "<...>/vcpkg_ubuntu-20.04_llvm-12_amd64" spdlog
+```
-To ensure you update dependencies, it is best to completely remove the `vcpkg/installed` directory and re-run the build script. If you are more familiar with vcpkg, then you can use vcpkg's own commands to better manage your packages. Read the vcpkg documentation to learn more.
+When reusing the pre-built export directory downloaded from GitHub, you must specify `--release` (see the 'Debug and Release Builds' section below) to build only release binaries. You cannot use dependencies from different triplets.
### Debug and Release Builds
@@ -75,21 +69,31 @@ To build both debug and release versions with llvm-12, just run the following
The script will be verbose about what it is doing and will clone the correct version of vcpkg (found in `vcpkg_info.txt`) and build everything in the `vcpkg` directory in the root of this repo.
-At the end it will print how to use the library.
+At the end it will print how to use the library:
+
+```bash
+$ ./build_dependencies.sh --export-dir example-export-dir
+...
+[+] Set the following in your CMake configure command to use these dependencies!
+[+] -DCMAKE_TOOLCHAIN_FILE="/Users/ekilmer/src/cxx-common/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-osx -DVCPKG_HOST_TRIPLET=x64-osx
+```
## Just release builds
If you don't want to compile a debug version of the tools, just pass `--release` to the script.
```bash
-./build_dependencies.sh --release llvm-12
+$ ./build_dependencies.sh --release llvm-12
+...
+[+] Set the following in your CMake configure command to use these dependencies!
+[+] -DCMAKE_TOOLCHAIN_FILE="/Users/ekilmer/src/cxx-common/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-osx-rel -DVCPKG_HOST_TRIPLET=x64-osx-rel
```
### Address Sanitizer
:warning: **Not tested on all vcpkg packages.** Open an issue if a tool's dependency cannot be built with sanitizers.
-There is experimental support for compiling dependencies with address sanitizer using the `*-asan` suffix for OSX and Linux triplets.
+There is experimental support for compiling dependencies with address sanitizer using the `*-asan` suffix for `osx` and `linux` triplets.
These dependencies can be built with the script by passing `--asan` to the script, and it should work whether building only Release or both Debug and Release:
@@ -97,29 +101,36 @@ These dependencies can be built with the script by passing `--asan` to the scrip
./build_dependencies.sh [--release] --asan llvm-12
```
-Just because your dependencies were built with a sanitizer, you'll still need to manually add support for sanitizer usage within your own project. A quick and dirty way involves specifying the extra compilation flags during the build process:
+Just because your dependencies were built with a sanitizer, you'll still need to manually add support for sanitizer usage within your own project. A quick and dirty way involves specifying the extra compilation flags during CMake configure:
```bash
-CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -ffunction-sections -fdata-sections" \
- CFLAGS="-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -ffunction-sections -fdata-sections" \
- LDFLAGS="-fsanitize=address" \
- cmake \
+$ cmake \
-DVCPKG_ROOT="" \
-DVCPKG_TARGET_TRIPLET=x64-linux-rel-asan \
- ..
+ -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -ffunction-sections -fdata-sections" \
+ -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -ffunction-sections -fdata-sections" \
+ -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" \
+ -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address" \
+ -DCMAKE_STATIC_LINKER_FLAGS="-fsanitize=address" \
+ -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" \
+ ...
```
-**NOTE:** it is important to specify the `VCPKG_TARGET_TRIPLET` based on what platform and build configuration was used while compiling your dependencies with the sanitizers.
+**NOTE:** it is important to specify the `VCPKG_TARGET_TRIPLET` based on what platform and build configuration was used while compiling your dependencies with the sanitizers (look for the usage message that the script outputs at the end).
## Dependency Versioning
-The version of each dependency is influenced by the git checkout of vcpkg, contained in `vcpkg_info.txt`. Currently, the only way to upgrade is to push the commit in that file up, **_or_** to create (likely copy) a port definition for the required version and place it in our local `ports` ([overlay](https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md)) directory. While we do support multiple LLVM versions, it is not easy or well-supported (yet) to have different versions installed simultaneously; you should remove the unwanted version before installing another, which is why the `./build_dependencies.sh` script always reinstalls packages to ensure we are starting from nothing.
+The version of each dependency is influenced by the git checkout of vcpkg, contained in `vcpkg_info.txt`. Currently, the only way to upgrade is to push the commit in that file up, **_or_** to create (likely copy) a port definition for the required version and place it in our local `ports` ([overlay](https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md)) directory. While we do support multiple LLVM versions, it is not easy or well-supported (yet) to have different versions installed simultaneously.
+
+See [the vcpkg docs](https://github.com/microsoft/vcpkg/blob/master/docs/examples/packaging-github-repos.md) for how to package a new library.
+
+### Updating Dependencies
-See [here](https://github.com/microsoft/vcpkg/blob/master/docs/examples/packaging-github-repos.md) for how to package a new library.
+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`).
## 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.
+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.
The following commands should be run from the root of this repo, and they do not apply if you have downloaded pre-built packages.
@@ -128,21 +139,22 @@ The following commands should be run from the root of this repo, and they do not
Remember, you must know the triplet you would like to build with if you are using an existing installation after running the build script.
```sh
-./vcpkg/vcpkg install --triplet=x64-osx-rel @overlays.txt --debug grpc
+./vcpkg/vcpkg install --triplet=x64-osx-rel @overlays.txt --debug grpc --x-install-root=<...>/installed
```
This command will
* `install` the `grpc` package
* using the `x64-osx-rel` triplet to only build x86-64 Release builds for Mac
* in the context of `@overlays.txt`, which sets up vcpkg package paths using normal vcpkg commands (look at the file if you're interested)
-* and tell vcpkg to print out `--debug` information
+* tell vcpkg to print out `--debug` information
+* and use the `install-root` of `<...>/installed` where `<...>` is a path to your export directory or the local `vcpkg` repo.
### Uninstalling
Remember, you must know the triplet you would like to build with if you are using an existing installation after running the build script.
```sh
-./vcpkg/vcpkg remove --triplet=x64-osx-rel @overlays.txt --debug grpc
+./vcpkg/vcpkg remove --triplet=x64-osx-rel @overlays.txt --debug grpc --x-install-root=<...>/installed
```
This command will do similar things as the above command, except it will `remove` the package from the installation directory instead of installing.
diff --git a/build_dependencies.sh b/build_dependencies.sh
index 5ec9878d..dc19494b 100755
--- a/build_dependencies.sh
+++ b/build_dependencies.sh
@@ -12,7 +12,7 @@ function die {
function Help
{
- echo "Usage: ./build_dependencies.sh [--release] [--asan] [--export-dir DIR] [...]"
+ echo "Usage: ./build_dependencies.sh [--release] [--asan] [--upgrade-ports] [--export-dir DIR] [...]"
echo ""
echo "Options:"
echo " --release"
@@ -20,6 +20,11 @@ function Help
echo " this script"
echo " --asan"
echo " Build with ASAN triplet as detected in this script"
+ echo " --upgrade-ports"
+ echo " Upgrade any outdated packages in the chosen install/export"
+ echo " directory. Warning, this could cause long rebuild times if your"
+ echo " compiler has changed or your installation directory hasn't been"
+ echo " updated in a while."
echo " --export-dir "
echo " Export built dependencies to directory path"
echo " [...]"
@@ -27,9 +32,14 @@ function Help
echo " other ports, vcpkg-specific options, etc."
}
+if [[ -n "${VCPKG_ROOT+x}" ]]; then
+ unset VCPKG_ROOT
+fi
+
RELEASE="false"
ASAN="false"
EXPORT_DIR=""
+UPGRADE_PORTS="false"
VCPKG_ARGS=()
while [[ $# -gt 0 ]] ; do
key="$1"
@@ -39,6 +49,10 @@ while [[ $# -gt 0 ]] ; do
Help
exit 0
;;
+ --upgrade-ports)
+ UPGRADE_PORTS="true"
+ msg "Upgrading any outdated ports"
+ ;;
--release)
RELEASE="true"
msg "Building Release-only binaries"
@@ -62,11 +76,11 @@ msg " " "${VCPKG_ARGS[@]}"
function die_if_not_installed {
if ! type $1 &>/dev/null; then
- die "Please install the package providing [${1}] for your OS"
+ die "Please install the package providing [${1}] command for your OS"
fi
}
-for pkg in git zip unzip cmake ninja python3 curl tar pkg-config
+for pkg in git zip unzip cmake python3 curl tar pkg-config
do
die_if_not_installed ${pkg}
done
@@ -155,13 +169,10 @@ vcpkg_dir="${repo_dir:?}/vcpkg"
if [[ -z ${EXPORT_DIR} ]]; then
# Set default export directory variable. Used for printing end message
EXPORT_DIR="${vcpkg_dir}"
-else
- if [[ -d "${EXPORT_DIR}" ]]; then
- die "Export directory already exists, please delete: '${EXPORT_DIR}'"
- fi
fi
+mkdir -p "${EXPORT_DIR}"
-extra_vcpkg_args+=("--triplet=${triplet}" "--host-triplet=${triplet}")
+extra_vcpkg_args+=("--triplet=${triplet}" "--host-triplet=${triplet}" "--x-install-root=${EXPORT_DIR}/installed")
extra_cmake_usage_args+=("-DVCPKG_TARGET_TRIPLET=${triplet}" "-DVCPKG_HOST_TRIPLET=${triplet}")
@@ -195,6 +206,29 @@ msg "Boostrapping vcpkg"
"${vcpkg_dir}/bootstrap-vcpkg.sh"
)
+# Copy required buildsystem scripts to export directory (this is what the
+# `vcpkg export` command does).
+# See the following `export_integration_files` function for the list of files.
+# This should be updated when that is updated.
+# https://github.com/microsoft/vcpkg-tool/blob/1533e9db90da0571e29e7ef85c7d5343c7fb7616/src/vcpkg/export.cpp#L259-L279
+if [[ "${EXPORT_DIR}" != "${vcpkg_dir}" ]]; then
+ msg "Copying required vcpkg files to export directory"
+ mkdir -p "${EXPORT_DIR}"
+ touch "${EXPORT_DIR}/.vcpkg-root"
+ integration_files=(
+ "scripts/buildsystems/msbuild/applocal.ps1"
+ "scripts/buildsystems/msbuild/vcpkg.targets"
+ "scripts/buildsystems/msbuild/vcpkg.props"
+ "scripts/buildsystems/msbuild/vcpkg-general.xml"
+ "scripts/buildsystems/vcpkg.cmake"
+ "scripts/cmake/vcpkg_get_windows_sdk.cmake"
+ )
+ for f in "${integration_files[@]}"
+ do
+ cmake -E copy_if_different "${vcpkg_dir}/${f}" "${EXPORT_DIR}/${f}"
+ done
+fi
+
msg "Building dependencies"
msg "Passing extra args to 'vcpkg install':"
msg " " "${VCPKG_ARGS[@]}"
@@ -206,37 +240,27 @@ msg " " "${VCPKG_ARGS[@]}"
set -x
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' '@dependencies.txt' "${VCPKG_ARGS[@]}"
-
- # This forces everyone to be updated but maybe this is too much trouble to
- # actually rebuild everything that has a mismatching hash.
- # "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run
-
- find "${vcpkg_dir}"/installed/*/tools/protobuf/ -type f -exec chmod 755 {} + || true
- find "${EXPORT_DIR}"/installed/*/tools/protobuf/ -type f -exec chmod 755 {} + || true
)
)
-# Don't export if we've already installed to an existing EXPORT_DIR
-if [[ ! -d "${EXPORT_DIR}" ]]; then
- tmp_export_dir=temp-export
- set -x
- "${vcpkg_dir}/vcpkg" export --x-all-installed --raw "--output=${tmp_export_dir}"
- mv "${vcpkg_dir}/${tmp_export_dir}" "${EXPORT_DIR}"
- set +x
+# Check if we should upgrade ports
+if [[ ${UPGRADE_PORTS} == "true" ]]; then
+ echo ""
+ msg "Checking and upgrading outdated ports"
+ (
+ cd "${repo_dir}"
+ (
+ set -x
+ "${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" '@overlays.txt' --no-dry-run --allow-unsupported
+ )
+ )
fi
echo ""
-# TODO: See https://github.com/microsoft/vcpkg/issues/1785
-#msg "The following packages are now available for your use:"
-#if echo "${extra_vcpkg_args[@]}" | grep -w -v -q -- '--x-install-root=' ; then
-# extra_vcpkg_args+=("--x-install-root=${EXPORT_DIR}/installed")
-#fi
-#set -x
-#"${vcpkg_dir}/vcpkg" "${extra_vcpkg_args[@]}" '@overlays.txt' list
-#set +x
+msg "Investigate the following directory to discover all packages available to you:"
+msg " ${EXPORT_DIR}/installed/vcpkg"
+echo ""
msg "Set the following in your CMake configure command to use these dependencies!"
-msg " -DVCPKG_ROOT=\"${EXPORT_DIR}\" ${extra_cmake_usage_args[*]}"
-msg "or"
msg " -DCMAKE_TOOLCHAIN_FILE=\"${EXPORT_DIR}/scripts/buildsystems/vcpkg.cmake\" ${extra_cmake_usage_args[*]}"
if [[ "$(uname -m)" = "aarch64" ]]; then
diff --git a/emit_artifacts.sh b/emit_artifacts.sh
deleted file mode 100755
index 7df65c4c..00000000
--- a/emit_artifacts.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-# Compression tool to use
-compressor="pixz"
-
-# Extension for compressed file generated by this script
-output_extension=".tar.xz"
-
-# NOTE: vcpkg saves the raw directory layout into a directory of the same name
-# as passed as argument without the output extension
-if [[ $1 != *"${output_extension}" ]]; then
- echo "Must provide output filename ending with '${output_extension}'"
- exit 1
-fi
-export_dir="${1%%${output_extension}*}"
-echo "Exporting to directory: ${export_dir}"
-
-# check for pixz for parallel xz
-if ! command -v "${compressor}" &>/dev/null; then
- echo "Could not find recommended compression tool '${compressor}'"
- echo "Please install and place on PATH."
- exit
-fi
-
-echo "Using compression tool '${compressor}'"
-echo ""
-
-# Check for vcpkg directory
-vcpkg_root="${PWD}/vcpkg"
-if [ ! -d "${vcpkg_root}" ]; then
- echo "Could not find 'vcpkg' directory at '${PWD}'"
- exit
-fi
-
-vcpkg_exe="${vcpkg_root}/vcpkg"
-if [ ! -f "${vcpkg_exe}" ]; then
- echo "Could not find 'vcpkg' executable at '${vcpkg_root}'"
- exit
-fi
-
-echo "Exporting all vcpkg packages"
-# TODO: Say something about the overlay directories
-# NOTE: Always saves the export output in vcpkg root
-start_time="$(date +%s)"
-(
- set -x
- "${vcpkg_exe}" export --x-all-installed --overlay-ports=./ports --overlay-triplets=./triplets --raw "--output=${export_dir}"
-)
-echo Duration: "$(($(date +%s) - start_time))s"
-echo ""
-
-echo "Compressing vcpkg packages with '${compressor}' to: ${1}"
-start_time="$(date +%s)"
-(
- set -x
- tar --use-compress-program "${compressor}" -cf "${1}" -C "${vcpkg_root}" "${export_dir}"
-)
-echo Duration: "$(($(date +%s) - start_time))s"
-echo ""
-
-echo "Cleaning up export directory"
-(
- set -x
- rm -r "${vcpkg_root:?}/${export_dir}"
-)
diff --git a/pull_dependencies.sh b/pull_dependencies.sh
deleted file mode 100755
index a344d7c7..00000000
--- a/pull_dependencies.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env bash
-
-# Try to pull prebuilt library dependencies using NuGet with your GitHub
-# credentials
-
-set -x -euo pipefail
-
-echo "Old and untested..."
-exit 1
-
-usage()
-{
-cat << EOF
-usage: pull_dependencies GITHUB_USERNAME GITHUB_TOKEN
- GITHUB_USERNAME | GitHub username associated with Token
- GITHUB_TOKEN | GitHub token to pull NuGet packages
-
-WARNING: Will write your token in plaintext at ~/.conig/NuGet/NuGet.config
-EOF
-}
-
-
-if [ -z ${1+x} ]; then
- echo "First argument GITHUB_USERNAME variable is unset";
- usage
- exit 1
-else
- GITHUB_USERNAME="$1"
-fi
-if [ -z ${2+x} ]; then
- echo "Second argument GITHUB_USERNAME variable is unset";
- usage
- exit 1
-else
- GITHUB_TOKEN="$2"
-fi
-
-
-#### Bootstrap vcpkg
-git clone https://github.com/microsoft/vcpkg.git || true
-# Thu Nov 12 23:28:59 2020 +0100
-# NOTE: Update .github/workflows/ci.yml as well
-pushd vcpkg && git fetch && git checkout b518035a33941380c044b00a1b4f8abff764cbdc && popd
-./vcpkg/bootstrap-vcpkg.sh
-
-
-#### Caching Setup
-
-# NOTE: "Source" is specific to what you name the NuGet feed when adding it
-export VCPKG_BINARY_SOURCES='clear;nuget,Source,read'
-
-# WARNING
-# Password stored in cleartext
-# TODO(ekilmer): Parameterize llvm version
-mono "$(./vcpkg/vcpkg fetch nuget | tail -n 1)" sources add \
- -source "https://nuget.pkg.github.com/lifting-bits/index.json" \
- -storepasswordincleartext \
- -name "Source" \
- -username "${GITHUB_USERNAME}" \
- -password "${GITHUB_TOKEN}" || true
-
-mono "$(./vcpkg/vcpkg fetch nuget | tail -n 1)" setapikey \
- -source "https://nuget.pkg.github.com/lifting-bits/index.json" \
- "${GITHUB_TOKEN}"
-
-#### Pulling dependencies with correct triplet
-
-unameOut="$(uname -s)"
-case "${unameOut}" in
- Linux*) triplet=x64-linux-rel;;
- Darwin*) triplet=x64-osx-rel;;
- *) triplet="UNKNOWN:${unameOut}"
-esac
-echo Using Triplet: "${triplet}"
-
-# TODO(ekilmer): Parameterize llvm version
-./vcpkg/vcpkg install \
- --triplet "${triplet}" \
- --debug \
- llvm-10 \
- @dependencies.txt