diff --git a/README.md b/README.md index 41c26a0a..c82ca192 100644 --- a/README.md +++ b/README.md @@ -324,8 +324,7 @@ The script `utils/git-sync-deps` can be used to checkout and/or update the contents of the repos under `external/` instead of manually maintaining them. ### Build using CMake -You can build The project using [CMake][cmake] to generate platform-specific -build configurations. +You can build the project using [CMake][cmake]: ```sh cd @@ -333,8 +332,36 @@ mkdir build && cd build cmake [-G ] ``` -Once the build files have been generated, build using your preferred -development environment. +Once the build files have been generated, build using the appropriate build +command (e.g. `ninja`, `make`, `msbuild`, etc.; this depends on the platform +generator used above), or use your IDE, or use CMake to run the appropriate build +command for you: + +```sh +cmake --build . [--config Debug] # runs `make` or `ninja` or `msbuild` etc. +``` + +#### Note about the fuzzer + +The SPIR-V fuzzer, `spirv-fuzz`, can only be built via CMake, and is disabled by +default. To build it, clone protobuf and use the `SPIRV_BUILD_FUZZER` CMake +option, like so: + +```sh +# In (the SPIRV-Tools repo root): +git clone https://github.com/protocolbuffers/protobuf external/protobuf +pushd external/protobuf +git checkout v3.7.1 +popd + +# In your build directory: +cmake [-G ] -DSPIRV_BUILD_FUZZER=ON +cmake --build . --config Debug +``` + +You can also add `-DSPIRV_ENABLE_LONG_FUZZER_TESTS=ON` to build additional +fuzzer tests. + ### Build using Bazel You can also use [Bazel](https://bazel.build/) to build the project.