Context: https://github.com/llvm/llvm-project/pull/87017 - Add proxy header `libc/hdr/math_macros.h` that will: - include `<math.h>` in overlay mode, - include `"include/llvm-libc-macros/math-macros.h"` in full build mode. - Its corresponding CMake target `libc.hdr.math_macros` will only depend on `libc.include.math` and `libc.include.llvm-libc-macros.math_macros` in full build mode. - Replace all `#include "include/llvm-libc-macros/math-macros.h"` with `#include "hdr/math_macros.h"`. - Add dependency to `libc.hdr.math_macros` CMake target when using `add_fp_unittest`. - Update the remaining dependency. - Update bazel overlay: add `libc:hdr_math_macros` target, and replacing all dependency on `libc:llvm_libc_macros_math_macros` with `libc:hdr_math_macros`.
80 lines
1.5 KiB
CMake
80 lines
1.5 KiB
CMake
add_libc_fuzzer(
|
|
qsort_fuzz
|
|
SRCS
|
|
qsort_fuzz.cpp
|
|
DEPENDS
|
|
libc.src.stdlib.qsort
|
|
)
|
|
|
|
add_libc_fuzzer(
|
|
atof_differential_fuzz
|
|
SRCS
|
|
atof_differential_fuzz.cpp
|
|
HDRS
|
|
StringParserOutputDiff.h
|
|
DEPENDS
|
|
libc.src.stdlib.atof
|
|
)
|
|
|
|
add_libc_fuzzer(
|
|
strtofloat_fuzz
|
|
NEED_MPFR
|
|
SRCS
|
|
strtofloat_fuzz.cpp
|
|
DEPENDS
|
|
libc.hdr.math_macros
|
|
libc.src.stdlib.atof
|
|
libc.src.stdlib.strtof
|
|
libc.src.stdlib.strtod
|
|
libc.src.stdlib.strtold
|
|
libc.src.__support.FPUtil.fp_bits
|
|
)
|
|
|
|
add_libc_fuzzer(
|
|
strtointeger_differential_fuzz
|
|
SRCS
|
|
strtointeger_differential_fuzz.cpp
|
|
HDRS
|
|
StringParserOutputDiff.h
|
|
DEPENDS
|
|
libc.src.stdlib.atoi
|
|
libc.src.stdlib.atol
|
|
libc.src.stdlib.atoll
|
|
libc.src.stdlib.strtol
|
|
libc.src.stdlib.strtoll
|
|
libc.src.stdlib.strtoul
|
|
libc.src.stdlib.strtoull
|
|
)
|
|
|
|
add_libc_fuzzer(
|
|
strtointeger_differential_fuzz_cleaner
|
|
SRCS
|
|
strtointeger_differential_fuzz.cpp
|
|
HDRS
|
|
StringParserOutputDiff.h
|
|
DEPENDS
|
|
libc.src.stdlib.atoi
|
|
libc.src.stdlib.atol
|
|
libc.src.stdlib.atoll
|
|
libc.src.stdlib.strtol
|
|
libc.src.stdlib.strtoll
|
|
libc.src.stdlib.strtoul
|
|
libc.src.stdlib.strtoull
|
|
COMPILE_OPTIONS
|
|
-DLIBC_COPT_FUZZ_ATOI_CLEANER_INPUT
|
|
)
|
|
|
|
add_libc_fuzzer(
|
|
strtointeger_fuzz
|
|
SRCS
|
|
strtointeger_fuzz.cpp
|
|
DEPENDS
|
|
libc.src.stdlib.atoi
|
|
libc.src.stdlib.atol
|
|
libc.src.stdlib.atoll
|
|
libc.src.stdlib.strtol
|
|
libc.src.stdlib.strtoll
|
|
libc.src.stdlib.strtoul
|
|
libc.src.stdlib.strtoull
|
|
)
|