mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-02 13:20:20 +00:00
Merge pull request #1823 from silvergasp/fix_cluster_fuzz_flags
fix(fuzz): Make sanitizer flags optional
This commit is contained in:
commit
18043131d0
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@ -38,6 +38,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Fuzzer
|
- name: Build Fuzzer
|
||||||
run: |
|
run: |
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
fuzz_harness=$(ls -d test/fuzz/device/*/)
|
fuzz_harness=$(ls -d test/fuzz/device/*/)
|
||||||
for h in $fuzz_harness
|
for h in $fuzz_harness
|
||||||
do
|
do
|
||||||
|
@ -16,9 +16,9 @@ __check_defined = \
|
|||||||
|
|
||||||
#-------------- Fuzz harness compiler ------------
|
#-------------- Fuzz harness compiler ------------
|
||||||
|
|
||||||
CC = clang
|
CC ?= clang
|
||||||
CXX = clang++
|
CXX ?= clang++
|
||||||
GDB = gdb
|
GDB ?= gdb
|
||||||
OBJCOPY = objcopy
|
OBJCOPY = objcopy
|
||||||
SIZE = size
|
SIZE = size
|
||||||
MKDIR = mkdir
|
MKDIR = mkdir
|
||||||
@ -34,6 +34,13 @@ else
|
|||||||
PYTHON = python3
|
PYTHON = python3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#-------------- Fuzz harness flags ------------
|
||||||
|
COVERAGE_FLAGS ?= -fsanitize-coverage=trace-pc-guard
|
||||||
|
SANITIZER_FLAGS ?= -fsanitize=fuzzer \
|
||||||
|
-fsanitize=address
|
||||||
|
|
||||||
|
CFLAGS += $(COVERAGE_FLAGS) $(SANITIZER_FLAGS)
|
||||||
|
|
||||||
#-------------- Source files and compiler flags --------------
|
#-------------- Source files and compiler flags --------------
|
||||||
|
|
||||||
|
|
||||||
@ -42,9 +49,6 @@ INC += $(TOP)/test
|
|||||||
# Compiler Flags
|
# Compiler Flags
|
||||||
CFLAGS += \
|
CFLAGS += \
|
||||||
-ggdb \
|
-ggdb \
|
||||||
-fsanitize=fuzzer \
|
|
||||||
-fsanitize=address \
|
|
||||||
-fsanitize=undefined \
|
|
||||||
-fdata-sections \
|
-fdata-sections \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user