Skip to content

Commit b0333e7

Browse files
authored
kokoro: test spirv-fuzz in cmake linux clang release configs (#6745)
This exercises the protobuf dependency. Also, when building with cmake release builds, use Release instead of RelWithDebInfo to save time.
1 parent 34ef6a3 commit b0333e7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

kokoro/scripts/linux/build-docker.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if [ $TOOL = "cmake" ]; then
5858
# ASAN, UBSAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW
5959
BUILD_TYPE="Debug"
6060
if [ $CONFIG = "RELEASE" ] || [ $CONFIG = "RELEASE_MINGW" ]; then
61-
BUILD_TYPE="RelWithDebInfo"
61+
BUILD_TYPE="Release"
6262
fi
6363

6464
SKIP_TESTS="False"
@@ -83,8 +83,13 @@ if [ $TOOL = "cmake" ]; then
8383
SKIP_TESTS="True"
8484
fi
8585

86-
if [ $COMPILER = "clang" ]; then
86+
# Build fuzzers on selected configurations.
87+
if [ $COMPILER-$CONFIG = "clang-RELEASE" ]; then
88+
# Build targets that fuzz the assembler, binary parser, disassembler,
89+
# optimizer, and validator.
8790
ADDITIONAL_CMAKE_FLAGS="$ADDITIONAL_CMAKE_FLAGS -DSPIRV_BUILD_LIBFUZZER_TARGETS=ON"
91+
# Build spirv-fuzz, including its protobuf dependency
92+
ADDITIONAL_CMAKE_FLAGS="$ADDITIONAL_CMAKE_FLAGS -DSPIRV_BUILD_FUZZER=ON"
8893
fi
8994

9095
clean_dir "$ROOT_DIR/build"

0 commit comments

Comments
 (0)