[infra] no need to call /env

This commit is contained in:
Mike Aizatsky 2016-08-07 19:53:25 -07:00
parent a4b1f6c2a5
commit 69110e1f33
7 changed files with 16 additions and 23 deletions

View File

@ -15,8 +15,6 @@
# limitations under the License.
#
################################################################################
. /env
mkdir -p /work/boringssl
cd /work/boringssl

View File

@ -1,6 +1,4 @@
#!/bin/bash -eu
. /env
cd /src/expat/expat
./buildconf.sh

View File

@ -15,8 +15,6 @@
# limitations under the License.
#
################################################################################
. /env
cd /src/freetype2/
./autogen.sh

View File

@ -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 /

View File

@ -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"]

View 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 "---------------------------------------------------------------"
$*

View File

@ -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/"
}