diff --git a/.github/workflows/vcpkg_docker_amd64.yml b/.github/workflows/vcpkg_docker_amd64.yml index edfa1f9c..51604772 100644 --- a/.github/workflows/vcpkg_docker_amd64.yml +++ b/.github/workflows/vcpkg_docker_amd64.yml @@ -32,7 +32,6 @@ jobs: host: - { name: 'ubuntu-22.04', arch: '' } container: - - { version: '20.04', codename: 'focal' } - { version: '22.04', codename: 'jammy' } runs-on: ${{ matrix.host.name }} diff --git a/.github/workflows/vcpkg_release.yml b/.github/workflows/vcpkg_release.yml index 607567e1..6807995d 100644 --- a/.github/workflows/vcpkg_release.yml +++ b/.github/workflows/vcpkg_release.yml @@ -8,7 +8,7 @@ name: release jobs: release: name: Publish Release on GitHub - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Create Release diff --git a/README.md b/README.md index b2e20e64..233bcdc2 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ To use the dependencies, just download the compressed file and decompress it. Th For example: ```bash -curl -LO https://github.com/lifting-bits/cxx-common/releases/latest/download/vcpkg_ubuntu-20.04_llvm-15_amd64.tar.xz -tar -xJf vcpkg_ubuntu-20.04_llvm-15_amd64.tar.xz +curl -LO https://github.com/lifting-bits/cxx-common/releases/latest/download/vcpkg_ubuntu-22.04_llvm-16_amd64.tar.xz +tar -xJf vcpkg_ubuntu-22.04_llvm-16_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="<...>/vcpkg_ubuntu-20.04_llvm-15_amd64/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-rel +-DCMAKE_TOOLCHAIN_FILE="<...>/vcpkg_ubuntu-22.04_llvm-16_amd64/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-rel ``` Replace `x64-linux-rel` with `x64-osx-rel` if using the macOS pre-built download. @@ -29,12 +29,12 @@ Replace `x64-linux-rel` with `x64-osx-rel` if using the macOS pre-built download 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`](./dependencies.txt), which doesn't include an LLVM version, so passing an `llvm-15` 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). +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-16` 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). -You can customize the features that a particular package is built with by specifying the feature name between brackets, i.e. `llvm-15[target-all]` (build all target backends), to ensure non-default features are also installed along with all default features. The list of features can be found in the target port's `vcpkg.json` file. Please read the [vcpkg docs](https://github.com/microsoft/vcpkg/blob/master/docs/users/selecting-library-features.md#installing-additional-features) for more information about specifying additional features. +You can customize the features that a particular package is built with by specifying the feature name between brackets, i.e. `llvm-16[target-all]` (build all target backends), to ensure non-default features are also installed along with all default features. The list of features can be found in the target port's `vcpkg.json` file. Please read the [vcpkg docs](https://github.com/microsoft/vcpkg/blob/master/docs/users/selecting-library-features.md#installing-additional-features) for more information about specifying additional features. ```bash -./build_dependencies.sh llvm-15 +./build_dependencies.sh llvm-16 ``` 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. @@ -46,25 +46,25 @@ Note that vcpkg will use binary caching to store built dependency packages (usua 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-15-install llvm-15 +./build_dependencies.sh --export-dir vcpkg-llvm-16-install llvm-16 ``` -will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 15 and install into a local directory named `vcpkg-llvm-15-install`. +will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 15 and install into a local directory named `vcpkg-llvm-16-install`. 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: ```bash -./build_dependencies.sh --release --export-dir "<...>/vcpkg_ubuntu-20.04_llvm-15_amd64" spdlog +./build_dependencies.sh --release --export-dir "<...>/vcpkg_ubuntu-22.04_llvm-16_amd64" spdlog ``` 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 -To build both debug and release versions with llvm-15, just run the following +To build both debug and release versions with llvm-16, just run the following ```bash -./build_dependencies.sh llvm-15 +./build_dependencies.sh llvm-16 ``` 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. @@ -83,7 +83,7 @@ $ ./build_dependencies.sh --export-dir example-export-dir 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-15 +$ ./build_dependencies.sh --release llvm-16 ... [+] 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 @@ -98,7 +98,7 @@ There is experimental support for compiling dependencies with address sanitizer 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: ```bash -./build_dependencies.sh [--release] --asan llvm-15 +./build_dependencies.sh [--release] --asan llvm-16 ``` 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: