$ time python3 buildscripts/scons.py --implicit-cache --build-fast-and-loose=on --dbg=on --opt=on --variables-files="/home/andrew/.scons/site_scons/mongo_custom_variables.py etc/scons/mongodbtoolchain_stable_gcc.vars" --link-model=dynamic --install-mode=hygienic --allocator=system -j300 --use-libunwind -j300 install-all-meta -k ... Linking build/optdebug/mongo/bson/bson_validate_fuzzer g++: error: unrecognized argument to -fsanitize= option: 'fuzzer' Linking build/optdebug/mongo/util/net/asn1_parser_fuzzer g++: error: unrecognized argument to -fsanitize= option: 'fuzzer' Linking build/optdebug/mongo/db/op_msg_fuzzer g++: error: unrecognized argument to -fsanitize= option: 'fuzzer' scons: *** [build/optdebug/mongo/bson/bson_validate_fuzzer] Error 1 scons: *** [build/optdebug/mongo/util/net/asn1_parser_fuzzer] Error 1 scons: *** [build/optdebug/mongo/db/op_msg_fuzzer] Error 1 scons: done building targets (errors occurred during build). build/optdebug/mongo/bson/bson_validate_fuzzer failed: Error 1 build/optdebug/mongo/util/net/asn1_parser_fuzzer failed: Error 1 build/optdebug/mongo/db/op_msg_fuzzer failed: Error 1
We should add a probe to ensure that the current toolchain supports -fsanitize=fuzzer, and, if not, we shouldn't declare the fuzzing targets.