-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage - Ra 2022-01-10
Context:
Currently the CMake build for 'test/fuzz' assumes that it if can correctly source the LLVM CMake Package, the clang fuzzer library is available under the systems library path (i.e. can link with '-fsanitize=fuzzer').
This is incorrect/buggy behaviour. In some cases, CMake could source a LLVM Package, where the fuzzer library install is not under any default library system path. This hence leads to a compiler error, where the '-fsanitize=fuzzer' linker flag fails compilation (due to not being able to find libFuzzer).
Definition of Done:
There are two main approaches we could take. These either being:
- Correctly source the absolute location of the libFuzzer library and explicitly link the library file to the fuzzer test executable. We can source the full libFuzzer library path with 'llvm_map_components_to_libnames' (available under the CMake LLVM package). If the path cannot be sourced, skip compilation of the fuzzer.
- Test compile if the '-fsanitize=fuzzer' linker flag is available on the user's system. If not, skip compilation of the fuzzer.
I'd strongly prefer we go with Option 1 and try to make that work (Option 2 limits the ability to compile test/fuzz to specific system environment configurations)
- duplicates
-
WT-8516 Patch CMake to support Evergreen testing
- Closed