Add documentation about potential fuzzing pitfall

Change-Id: I2ea01b3ad3359510bff3ffd298d4ed17d3677ffc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20146
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
This commit is contained in:
Ryan Harrison 2020-04-22 00:26:49 +00:00 committed by dan sinclair
parent 3170bebba1
commit 1933185510
1 changed files with 15 additions and 0 deletions

View File

@ -16,6 +16,7 @@ This is not an officially supported Google product.
* `TINT_BUILD_WGSL_READER` : enable the WGSL input reader (on by default)
* `TINT_BUILD_SPV_WRITER` : enable the SPIR-V output writer (on by default)
* `TINT_BUILD_WGSL_WRITER` : enable the WGSL output writer (on by default)
* `TINT_BUILD_FUZZERS` : enable building fuzzzers (off by default)
## Building
Tint uses Chromium dependency management so you need to install [depot_tools]
@ -52,6 +53,20 @@ cmake ../..
make # -j N for N-way parallel build
```
### Fuzzers on MacOS
If you are attempting fuzz, using `TINT_BUILD_FUZZERS=ON`, the version of llvm
in the XCode SDK does not have the needed libfuzzer functionality included.
The build error that you will see from using the XCode SDK will look something
like this:
```
ld: file not found:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.fuzzer_osx.a
```
The solution to this problem is to use a full version llvm, like what you would
get via homebrew, `brew install llvm`, and use something like `CC=<path to full
clang> cmake ..` to setup a build using that toolchain.
## Issues
Please file any issues or feature requests at
https://bugs.chromium.org/p/tint/issues/entry