mirror of
https://github.com/google/santa.git
synced 2026-04-24 03:00:12 -04:00
* snapshot using rules_fuzzing, but this probably wont work because nothing supports objc * working fuzz * clean up * install libclang_rt.fuzzer_osx automatically; add to CI * retain corpus * restore old fuzzing stuff * corpus * move fuzz to separate timed action * review
15 lines
815 B
Bash
Executable File
15 lines
815 B
Bash
Executable File
#!/bin/bash
|
|
# Xcode doesn't include the fuzzer runtime, but the one LLVM ships is compatible with Apple clang.
|
|
set -uexo pipefail
|
|
|
|
CLANG_VERSION=$(clang --version | head -n 1 | cut -d' ' -f 4)
|
|
DST_PATH="$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/${CLANG_VERSION}/lib/darwin/libclang_rt.fuzzer_osx.a"
|
|
|
|
if [ -f ${DST_PATH} ]; then
|
|
exit 0;
|
|
fi
|
|
|
|
curl -O -L https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/clang+llvm-${CLANG_VERSION}-x86_64-apple-darwin.tar.xz
|
|
tar xvf clang+llvm-${CLANG_VERSION}-x86_64-apple-darwin.tar.xz clang+llvm-${CLANG_VERSION}-x86_64-apple-darwin/lib/clang/${CLANG_VERSION}/lib/darwin/libclang_rt.fuzzer_osx.a
|
|
cp clang+llvm-${CLANG_VERSION}-x86_64-apple-darwin/lib/clang/${CLANG_VERSION}/lib/darwin/libclang_rt.fuzzer_osx.a ${DST_PATH}
|