From 6cd224bb88c0bdd653db7c4e43225aa14f6dca3b Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 26 Oct 2024 10:27:05 -0400 Subject: [PATCH] Meta: Use release builds as the basis for Sanitizer builds LLVM recommends compiling with at least -O1 to have decent performance with sanitizers enabled. Indeed, this improves CI performance of LibWeb tests as follows: GCC on Linux: 160.61s to 119.68s (40.93s faster) Clang on Linux: 65.56s to 55.64s ( 9.92s faster) --- CMakePresets.json | 4 ++-- Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 6f20cc4885f..984fc39dc69 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -100,9 +100,9 @@ }, { "name": "Sanitizer", - "inherits": "Debug", + "inherits": "default", "displayName": "Sanitizer Config", - "description": "Debug build using Sanitizers", + "description": "Sanitizer build using Ninja generator", "binaryDir": "${fileDir}/Build/ladybird-sanitizers", "cacheVariables": { "ENABLE_UNDEFINED_SANITIZER": "ON", diff --git a/Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake b/Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake index b0ebad018f9..1eca4ceee3e 100644 --- a/Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake +++ b/Meta/CMake/vcpkg/sanitizer-triplets/sanitizer.cmake @@ -1,3 +1,4 @@ +set(VCPKG_BUILD_TYPE release) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "")