mirror of https://github.com/google/oss-fuzz.git
[infra] no need to call /env
This commit is contained in:
parent
a4b1f6c2a5
commit
69110e1f33
|
@ -15,8 +15,6 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
. /env
|
||||
|
||||
mkdir -p /work/boringssl
|
||||
cd /work/boringssl
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#!/bin/bash -eu
|
||||
. /env
|
||||
|
||||
cd /src/expat/expat
|
||||
|
||||
./buildconf.sh
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
. /env
|
||||
|
||||
cd /src/freetype2/
|
||||
|
||||
./autogen.sh
|
||||
|
|
|
@ -59,5 +59,3 @@ ENV CXXFLAGS_EXTRA "-stdlib=libc++"
|
|||
ENV CXXFLAGS "$CFLAGS $CXXFLAGS_EXTRA"
|
||||
|
||||
ENV LDFLAGS "-Wl,-Bstatic -lc++ -lc++abi -Wl,-Bdynamic"
|
||||
|
||||
COPY env /
|
||||
|
|
|
@ -23,13 +23,13 @@ VOLUME /src/oss-fuzz
|
|||
|
||||
RUN mkdir -p /work/libfuzzer
|
||||
|
||||
ENV sanitizer_flags="-fsanitize=address"
|
||||
ENV cov_flags="-fsanitize-coverage=edge,indirect-calls,8bit-counters"
|
||||
ENV SANITIZER_FLAGS="-fsanitize=address"
|
||||
ENV COV_FLAGS="-fsanitize-coverage=edge,indirect-calls,8bit-counters"
|
||||
|
||||
ENV ASAN_OPTIONS="symbolize=1"
|
||||
|
||||
ENV CFLAGS "$CFLAGS $sanitizer_flags $cov_flags"
|
||||
ENV CXXFLAGS "$CFLAGS $CXXFLAGS_EXTRA"
|
||||
|
||||
RUN mkdir /out
|
||||
VOLUME /out
|
||||
|
||||
COPY run /
|
||||
ENTRYPOINT ["/run"]
|
||||
|
|
19
infra/base-images/base-clang/env → infra/base-images/base-libfuzzer/run
Normal file → Executable file
19
infra/base-images/base-clang/env → infra/base-images/base-libfuzzer/run
Normal file → Executable file
|
@ -15,22 +15,23 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
echo "CC=$CC"
|
||||
echo "CXX=$CXX"
|
||||
echo "CFLAGS=$CFLAGS"
|
||||
echo "CXXFLAGS=$CXXFLAGS"
|
||||
|
||||
pushd $PWD > /dev/null
|
||||
echo "---------------------------------------------------------------"
|
||||
|
||||
echo -n "Compiling libFuzzer..."
|
||||
cd /work/libfuzzer
|
||||
$CXX -g -std=c++11 -stdlib=libc++ $sanitizer_flags -c /src/libfuzzer/*.cpp -I/src/libfuzzer
|
||||
$CXX $CXXFLAGS -std=c++11 $SANITIZER_FLAGS -c /src/libfuzzer/*.cpp -I/src/libfuzzer
|
||||
echo "Done."
|
||||
popd > /dev/null
|
||||
|
||||
export LIBCXX_FLAGS="-stdlib=libc++"
|
||||
export CXXFLAGS="$CFLAGS $LIBCXX_FLAGS"
|
||||
export CFLAGS="$CFLAGS $SANITIZER_FLAGS $COV_FLAGS"
|
||||
export CXXFLAGS="$CFLAGS $CXXFLAGS_EXTRA"
|
||||
|
||||
echo "CC=$CC"
|
||||
echo "CXX=$CXX"
|
||||
echo "CFLAGS=$CFLAGS"
|
||||
echo "CXXFLAGS=$CXXFLAGS"
|
||||
echo "LDFLAGS=$LDFLAGS"
|
||||
|
||||
echo "---------------------------------------------------------------"
|
||||
|
||||
$*
|
|
@ -71,7 +71,7 @@ def call(body) {
|
|||
def zipFile= "$projectName-$sanitizer-${date}.zip"
|
||||
|
||||
sh "mkdir -p $out"
|
||||
sh "docker run -v $workspace/$checkoutDir:/src/$checkoutDir -v $workspace/oss-fuzz:/src/oss-fuzz -v $out:/out -e sanitizer_flags=\"-fsanitize=$sanitizer\" -t $dockerTag"
|
||||
sh "docker run -v $workspace/$checkoutDir:/src/$checkoutDir -v $workspace/oss-fuzz:/src/oss-fuzz -v $out:/out -e SANITIZER_FLAGS=\"-fsanitize=$sanitizer\" -t $dockerTag"
|
||||
sh "zip -j $zipFile $out/*"
|
||||
sh "gsutil cp $zipFile gs://clusterfuzz-builds/$projectName/"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue