diff options
-rw-r--r-- | docs/getting-started/new_project_guide.md | 24 | ||||
-rwxr-xr-x | projects/capstone/build.sh | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/docs/getting-started/new_project_guide.md b/docs/getting-started/new_project_guide.md index d42db11a3..0ffba8f96 100644 --- a/docs/getting-started/new_project_guide.md +++ b/docs/getting-started/new_project_guide.md @@ -246,6 +246,30 @@ If your project is written in Go, check out the [Integrating a Go project]({{ si alphanumeric characters, underscore(_) or dash(-). Otherwise, they won't run on our infrastructure. 3. Don't remove source code files. They are needed for code coverage. +### Temporarily disabling code instrumentation during builds + +Sometimes not every 3rd party library might be needed to be instrumented or +tools are being compiled that just support the target built. + +If for any reasons part of the build process should not be instrumented +then the following code snippit can be used for this: + +``` +CFLAGS_SAVE="$CFLAGS" +CXXFLAGS_SAVE="$CXXFLAGS" +unset CFLAGS +unset CXXFLAGS +export AFL_NOOPT=1 + +# +# build commands here that should not result in instrumented code. +# + +export CFLAGS="${CFLAGS_SAVE}" +export CXXFLAGS="${CXXFLAGS_SAVE}" +unset AFL_NOOPT +``` + ### build.sh script environment When your build.sh script is executed, the following locations are available within the image: diff --git a/projects/capstone/build.sh b/projects/capstone/build.sh index 35720ea09..b0da12355 100755 --- a/projects/capstone/build.sh +++ b/projects/capstone/build.sh @@ -32,6 +32,7 @@ do sed -i -e 's/#print/print/' capstone/__init__.py ( export CFLAGS="" + export AFL_NOOPT=1 python setup.py install ) cd $SRC/capstone$branch/suite |