Skip to content

Commit

Permalink
Meta: Only build vcpkg dependencies in release mode by default
Browse files Browse the repository at this point in the history
We currently build debug and release versions of vcpkg dependencies. We
will most commonly only need the release version, so let's default to
that to approximately halve our dependency build time.
  • Loading branch information
trflynn89 committed Jun 28, 2024
1 parent cf0912c commit 1c2aef9
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 27 deletions.
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"SERENITY_CACHE_DIR": "${sourceDir}/Build/caches",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_INSTALL_OPTIONS": "--no-print-usage"
"VCPKG_INSTALL_OPTIONS": "--no-print-usage",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/Meta/CMake/vcpkg/release-triplets"
},
"environment": {
"LADYBIRD_SOURCE_DIR": "${sourceDir}",
Expand Down
4 changes: 4 additions & 0 deletions Meta/CMake/vcpkg/base-triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_CRT_LINKAGE dynamic)
3 changes: 3 additions & 0 deletions Meta/CMake/vcpkg/base-triplets/x64-linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
4 changes: 4 additions & 0 deletions Meta/CMake/vcpkg/base-triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_CRT_LINKAGE dynamic)
2 changes: 2 additions & 0 deletions Meta/CMake/vcpkg/release-triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/arm64-osx.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/release.cmake)
2 changes: 2 additions & 0 deletions Meta/CMake/vcpkg/release-triplets/release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(VCPKG_BUILD_TYPE release)
set(VCPKG_LIBRARY_LINKAGE static)
2 changes: 2 additions & 0 deletions Meta/CMake/vcpkg/release-triplets/x64-linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-linux.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/release.cmake)
2 changes: 2 additions & 0 deletions Meta/CMake/vcpkg/release-triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-osx.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/release.cmake)
11 changes: 2 additions & 9 deletions Meta/CMake/vcpkg/sanitizer-triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
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")
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/arm64-osx.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/sanitizer.cmake)
4 changes: 4 additions & 0 deletions Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_C_FLAGS "")
set(VCPKG_CXX_FLAGS "-frtti")
10 changes: 2 additions & 8 deletions Meta/CMake/vcpkg/sanitizer-triplets/x64-linux.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
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")
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-linux.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/sanitizer.cmake)
11 changes: 2 additions & 9 deletions Meta/CMake/vcpkg/sanitizer-triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
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")
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-osx.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/sanitizer.cmake)

0 comments on commit 1c2aef9

Please sign in to comment.