diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 59e887e29eb..15324bf6a51 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -17,10 +17,6 @@ runs: if: ${{ inputs.os == 'Linux' }} shell: bash run: | - # These packages are already part of the ubuntu-22.04 image: - # cmake libgmp-dev npm shellcheck - # Packages below aren't. - set -e wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - @@ -29,7 +25,7 @@ runs: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update - sudo apt-get install autoconf autoconf-archive automake ccache clang-18 clang++-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev + sudo apt-get install autoconf autoconf-archive automake build-essential cmake fonts-liberation2 zip curl tar ccache clang-18 clang++-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml index 241c085aace..cccf4bf7c18 100644 --- a/.github/workflows/lagom-template.yml +++ b/.github/workflows/lagom-template.yml @@ -76,6 +76,13 @@ jobs: echo "host_cxx=$(brew --prefix llvm@18)/bin/clang++" >> "$GITHUB_OUTPUT" fi + - name: Set dynamic environment variables + id: 'set-env-vars' + run: | + # Note: Required for vcpkg to use this compiler for its own builds. + echo "CC=${{ steps.build-parameters.outputs.host_cc }}" >> "$GITHUB_ENV" + echo "CXX=${{ steps.build-parameters.outputs.host_cxx }}" >> "$GITHUB_ENV" + # https://github.com/actions/runner-images/issues/9330 - name: Enable Microphone Access (macOS 14) if: ${{ inputs.os == 'macos-14' }} diff --git a/CMakePresets.json b/CMakePresets.json index 3e22c62faae..b83003a9ba0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -46,7 +46,8 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "ENABLE_UNDEFINED_SANITIZER": "ON", - "ENABLE_ADDRESS_SANITIZER": "ON" + "ENABLE_ADDRESS_SANITIZER": "ON", + "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/Meta/CMake/vcpkg/sanitizer-triplets" } }, { diff --git a/Meta/CMake/vcpkg/sanitizer-triplets/arm64-osx.cmake b/Meta/CMake/vcpkg/sanitizer-triplets/arm64-osx.cmake new file mode 100644 index 00000000000..d25fb9a6dae --- /dev/null +++ b/Meta/CMake/vcpkg/sanitizer-triplets/arm64-osx.cmake @@ -0,0 +1,9 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES arm64) + +set(VCPKG_C_FLAGS "") +set(VCPKG_CXX_FLAGS "-frtti") diff --git a/Meta/CMake/vcpkg/sanitizer-triplets/x64-linux.cmake b/Meta/CMake/vcpkg/sanitizer-triplets/x64-linux.cmake new file mode 100644 index 00000000000..1bf7c7990ea --- /dev/null +++ b/Meta/CMake/vcpkg/sanitizer-triplets/x64-linux.cmake @@ -0,0 +1,8 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_C_FLAGS "") +set(VCPKG_CXX_FLAGS "-frtti") diff --git a/Meta/CMake/vcpkg/sanitizer-triplets/x64-osx.cmake b/Meta/CMake/vcpkg/sanitizer-triplets/x64-osx.cmake new file mode 100644 index 00000000000..70251f2674d --- /dev/null +++ b/Meta/CMake/vcpkg/sanitizer-triplets/x64-osx.cmake @@ -0,0 +1,9 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES x86_64) + +set(VCPKG_C_FLAGS "") +set(VCPKG_CXX_FLAGS "-frtti")