mirror of
https://github.com/swiftlang/swift-cmark.git
synced 2026-01-18 17:31:20 +01:00
Prefer to use the standard `BUILD_SHARED_LIBS` option to control the library type that we are building. Build a single instance of the library. This allows for better control of the library usage in a larger project. See the following blog post for the recommendation: https://alexreinking.com/blog/building-a-dual-shared-and-static-library-with-cmake.html
The quadratic fuzzer generates long sequences of repeated characters, such as <?x<?x<?x<?x...,
to detect quadratic complexity performance issues.
To build and run the quadratic fuzzer:
mkdir build-fuzz
cd build-fuzz
cmake -DCMARK_FUZZ_QUADRATIC=ON -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DCMAKE_BUILD_TYPE=Release ..
make
../fuzz/fuzzloop.sh