From 4f337c7c09539dcc4b11ef44d6728f9ed5248417 Mon Sep 17 00:00:00 2001 From: Cody Gunton Date: Fri, 15 Mar 2024 10:33:38 -0400 Subject: [PATCH] feat: Add RelWithAssert build (#4997) A build with `ASSERT`s for those of us who don't regularly build and run in debug. --- barretenberg/cpp/CMakePresets.json | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/barretenberg/cpp/CMakePresets.json b/barretenberg/cpp/CMakePresets.json index 85e8c0c9490..cf1744b5c6f 100644 --- a/barretenberg/cpp/CMakePresets.json +++ b/barretenberg/cpp/CMakePresets.json @@ -70,6 +70,15 @@ "LDFLAGS": "-O2 -gdwarf-4" } }, + { + "name": "clang16-assert", + "displayName": "Build with Clang-16 using RelWithAssert", + "description": "Build with globally installed Clang-16 in release with ASSERTs mode", + "inherits": "default", + "environment": { + "CMAKE_BUILD_TYPE": "RelWithAssert" + } + }, { "name": "asan", "displayName": "Debugging build with address sanitizer on Clang-16", @@ -114,7 +123,8 @@ "CC": "gcc-13", "CXX": "g++-13" } - }, { + }, + { "name": "bench", "displayName": "Build benchmarks", "description": "Build default preset but with a special benchmark directory", @@ -359,6 +369,11 @@ "inherits": "default", "configurePreset": "clang16-dbg-fast" }, + { + "name": "clang16-assert", + "inherits": "default", + "configurePreset": "clang16-assert" + }, { "name": "asan", "inherits": "default", @@ -389,7 +404,7 @@ "inherits": "clang16", "configurePreset": "fuzzing" }, -{ + { "name": "fuzzing-asan", "inherits": "clang16-dbg", "configurePreset": "fuzzing-asan" @@ -442,14 +457,18 @@ "configurePreset": "wasm-dbg", "inheritConfigureEnvironment": true, "jobs": 0, - "targets": ["barretenberg.wasm"] + "targets": [ + "barretenberg.wasm" + ] }, { "name": "wasm-threads", "configurePreset": "wasm-threads", "inheritConfigureEnvironment": true, "jobs": 0, - "targets": ["barretenberg.wasm"] + "targets": [ + "barretenberg.wasm" + ] }, { "name": "xray", @@ -518,7 +537,7 @@ "inherits": "default", "configurePreset": "fuzzing" }, -{ + { "name": "fuzzing-asan", "inherits": "clang16-dbg", "configurePreset": "fuzzing-asan"