From 744ae17922504b76b902fb893d8a85a1fb8cce08 Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Thu, 13 Oct 2016 14:02:19 -0700 Subject: [PATCH] Update README.md --- infra/base-images/base-libfuzzer/README.md | 32 ++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/infra/base-images/base-libfuzzer/README.md b/infra/base-images/base-libfuzzer/README.md index 3e66e04a5..09ef82f1d 100644 --- a/infra/base-images/base-libfuzzer/README.md +++ b/infra/base-images/base-libfuzzer/README.md @@ -12,6 +12,30 @@ Supported commands: * `docker run -ti /bin/bash` - drop into shell. Run `compile` script to start build. +# Image Files Layout + +| Location | Description | +| -------- | ---------- | +| `/out/` | build artifacts should be copied here | +| `/work/` | used to store intermediate files | +| `/work/libfuzzer/*.o` | libfuzzer object files | + +# Provided Environment Variables + +You *must* use special compiler flags to build your library and fuzzers. +These flags are provided in following environment variables: + +| Env Variable | Description +| ------------- | -------- +| `$CC` | The C compiler binary. +| `$CXX`, `$CCC` | The C++ compiler binary. +| `$CFLAGS` | C compiler flags. +| `$CXXFLAGS` | C++ compiler flags. +| `$LDFLAGS` | Linker flags for fuzzer binaries. + +Many well-crafted build scripts will automatically use these variables. If not, +passing them manually to a build tool might be required. + # Child Image Interface ## Required Files @@ -33,11 +57,3 @@ Child image can define following environment variables: | `GIT_CHECKOUT_DIR` (optional) | directory (under `/src/`) to checkout into | | `SVN_CHECKOUT_DIR` (optional) | directory (under `/src/`) to checkout into | -# Image Layout - -| Location | Description | -| -------- | ---------- | -| `/src/build.sh` | build script for the project | -| `/src/` | checked out sources for the project; mounted when run | -| `/out/` | build artifacts should be copied here | -| `/work/` | used to store intermediate files |