diff --git a/.github/workflows/publish-bb.yml b/.github/workflows/publish-bb.yml index 28ddb777e5b6..00fa792ba6a1 100644 --- a/.github/workflows/publish-bb.yml +++ b/.github/workflows/publish-bb.yml @@ -51,7 +51,7 @@ jobs: run: | cd barretenberg/cpp - cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert + cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert -DTARGET_ARCH=westmere cmake --build --preset default --target bb - name: Tar and GZip bb Binary (Ubuntu) diff --git a/barretenberg/cpp/CMakePresets.json b/barretenberg/cpp/CMakePresets.json index 0b50ba0871c0..ec0889e64eb1 100644 --- a/barretenberg/cpp/CMakePresets.json +++ b/barretenberg/cpp/CMakePresets.json @@ -16,6 +16,9 @@ "CC": "clang", "CXX": "clang++", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + }, + "cacheVariables": { + "TARGET_ARCH": "skylake" } }, { @@ -51,20 +54,20 @@ "DISABLE_ASM": "ON" } }, - {"name":"asan", - "displayName": "Debugging build with address sanitizer on Clang-16", - "description": "Build with address sanitizer on clang16 with debugging information", - "inherits":"clang16-dbg", + { + "name": "asan", + "displayName": "Debugging build with address sanitizer on Clang-16", + "description": "Build with address sanitizer on clang16 with debugging information", + "inherits": "clang16-dbg", "binaryDir": "build-asan", -"environment": { + "environment": { "CMAKE_BUILD_TYPE": "Debug" }, "cacheVariables": { "ENABLE_ASAN": "ON", - "DISABLE_ASM": "ON" + "DISABLE_ASM": "ON" } - -}, + }, { "name": "gcc", "displayName": "Build with GCC", @@ -193,7 +196,8 @@ "name": "clang16-dbg", "inherits": "default", "configurePreset": "clang16-dbg" - },{ + }, + { "name": "asan", "inherits": "default", "configurePreset": "asan" @@ -218,7 +222,7 @@ "inherits": "clang16", "configurePreset": "fuzzing" }, - { + { "name": "smt-verification", "inherits": "clang16", "configurePreset": "smt-verification" @@ -278,7 +282,7 @@ "inherits": "default", "configurePreset": "clang16-dbg" }, - { + { "name": "asan", "inherits": "default", "configurePreset": "asan" diff --git a/barretenberg/cpp/cmake/arch.cmake b/barretenberg/cpp/cmake/arch.cmake index 1812e8eb3ede..7d517c88ad79 100644 --- a/barretenberg/cpp/cmake/arch.cmake +++ b/barretenberg/cpp/cmake/arch.cmake @@ -6,5 +6,6 @@ if(WASM) endif() if(NOT WASM AND NOT APPLE AND NOT ARM) - add_compile_options(-march=skylake) + message(STATUS "Target architecture: ${TARGET_ARCH}") + add_compile_options(-march=${TARGET_ARCH}) endif()