Skip to content

Commit a8ede40

Browse files
committed
fix for linux_sysroot issue
1 parent 6f7468c commit a8ede40

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

build/chip/fuzz_test.gni

+4-5
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,12 @@ template("chip_pw_fuzz_target") {
102102
"configs",
103103
])
104104

105-
# TODO see what to do with this, I added it to try running FuzzTest with compatibility mode, since this is the mode supported by OSS-fuzz
105+
# TODO: remove this
106+
#just a test for running FuzzTest with libfuzzer-compatibility mode, since this is the mode supported by OSS-fuzz
106107
# defines = [
107-
# "FUZZTEST_COMPATIBILITY_MODE=libfuzzer",
108+
# "FUZZTEST_COMPATIBILITY_MODE=libfuzzer",
108109
# "MAKE_BUILD_TYPE=RelWithDebug",
109-
# ]
110-
111-
#cflags = [ "-Wno-error=format-nonliteral" ] CAN NOT USE since strict_warning defines the opposite
110+
# ]
112111

113112
sources = [ _test ]
114113
output_dir = _test_output_dir

build/toolchain/pw_fuzzer/BUILD.gn

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ gcc_toolchain("chip_pw_fuzztest") {
4848
current_cpu = host_cpu
4949
is_clang = true
5050

51+
# the upstream pigweed host_clang toolchain defines a default sysroot, which results in build errors
52+
# since it does not include SSL and is supposed to be minimal by design.
53+
# by removing this default config, we will use the system's libs. Otherwise we can define our own sysroot.
54+
remove_default_configs = [ "$dir_pw_toolchain/host_clang:linux_sysroot" ]
55+
5156
# pw_toolchain_FUZZING_ENABLED = true
5257
treat_warnings_as_errors = false
5358

0 commit comments

Comments
 (0)