* mv instead of cp skia build.sh artifacts
Hopefully this will reduce the footprint so skia builds begin passing the CQ again.
* Update build.sh
Return some moves to copies, since the same corpus and binary is sometimes reused, slight reordering for clarity.
* Update build.sh with mv of reused corpus
Do this so that CIFuzz will work.
Co-authored-by: Zepeng Hu <zepenghu@google.com>
Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
Reducing the number of concurrent link steps to the number of cpus does
not appear to have made much difference to the success of the Skia
project build. Limit the number of concurrent links to one in an attempt
to avoid running out of memory. If issues persist it is likely the bot
running this simply does not have enough memory to run the linker step.
This change is speculative since these builds have been working on the
CI bots and only failing on the oss-fuzz build.
Bug: oss-fuzz:23438,oss-fuzz:24345
The number of link build steps in the Skia build is currently not
limited and may be leading to the current failures where the linker is
killed with a signal. This changes that to limit the number of
concurrent linker steps to the number of cpus available. If there
continue to be issues it may be necessary to implement a hard limit.
Bug: oss-fuzz:23438,oss-fuzz:24345
The gold linker was forced when the system linker stopped linking the
Skia build. It seems that the gold linker is now running into issues, so
attempt to switch back.
The SwiftShader build seems to want SWIFTSHADER_EMIT_COVERAGE set or it
will do things that interfere with a coverage build. Use this to
simplify the SwuftShader build a bit and hopefully restore the coverage
build.
By default a cmake based build puts user provided flags at the beginning
of a compiler invocation, giving them lowest priority. This makes it
quite difficult to add the required -fno-sanitize=vptr flag since it
will be placed before -fsanitize=undefined in a SWIFTSHADER_UBSAN build.
To make this work will require upstream changes to SwiftShader's build.
However, it is not necessary to build SwiftShader with the undefined
behavior sanitizer in order to fuzz Skia for issues. (This is only
required for the memory sanitizer which fortunately works.) As a result,
build SwiftShader without the sanitizer in the Skia undefined sanitizer
fuzzer build.
* [skia] Update diff for upstream change.
SkReadBuffer::getArrayCount() implementation changed, so update the
diff.
* [skia] Build fix for upstream build changes.
Skia is changing its build a little bit. 'skia_enable_fontmgr_custom'
has become 'skia_enable_fontmgr_custom_directory' (since that is what
it actually did) and skia_enable_fontmgr_custom_embedded has been added.
* [skia] Update SwiftShader to something not so old.
Skia builds it without submodules. Only build libGLESv2 and libEGL
instead of building everything, which isn't needed and takes a long
time. SwiftShader already has a checked-in build/ directory, so use a
different directory for building. Limit the number of make jobs to avoid
'Cannot allocate memory' errors. To build SwiftShader with a sanitizer,
the cmake define is now like SWIFTSHADER_XSAN.
Don't explicityly clone SwiftShader in the Dockerfile, since Skia
does that itself.
Also, make a speculative fix for a build issue where builders get
confused by the current working directory.
This requires building SwiftShader as well as changes to skia's
build. Reenables fuzzers that were disabled for AFL since we no
longer need to patch the binaries.
Also optimize invocations of git clone by adding --depth 1.
After building AFL fuzzers we will now check if they crash immediately before
uploading a build to CF. That means we can't build broken fuzzers or else
the entire build breaks.