This is an archive of the discontinued LLVM Phabricator instance.

Add a Dockerfile for clang-proto-fuzzer
ClosedPublic

Authored by kcc on Aug 11 2017, 1:06 PM.

Event Timeline

kcc created this revision.Aug 11 2017, 1:06 PM
morehouse added inline comments.Aug 11 2017, 1:58 PM
tools/clang-fuzzer/Dockerfile
23

What if the latest revision breaks the build?

25

Should this be svn co ... compiler-rt?

kcc updated this revision to Diff 110810.Aug 11 2017, 2:03 PM

fix 'svn co' command (apparently it did not matter though)

kcc added inline comments.Aug 11 2017, 2:05 PM
tools/clang-fuzzer/Dockerfile
23

Then we will know that!

I hope to have clang-proto-fuzzer on a bot of some kind at some point, maybe on oss-fuzz, so we will know if the TotT is broken

25

Of course, fixed. !
Very surprisingly, this still worked!

morehouse accepted this revision.Aug 11 2017, 2:30 PM
This revision is now accepted and ready to land.Aug 11 2017, 2:30 PM
hintonda added a subscriber: hintonda.EditedAug 11 2017, 3:30 PM

You may want to add an ARG instruction to force docker to rerun the svn commands each time you invoke docker build. Otherwise it will reuse the cache since docker only looks at the RUN text, not it's result.

To get around that, you can add an ARG REVISION instruction before the first RUN command, and use $REVISION in your subsequent svn co commands. The ARG instruction, will invalidate the cache for the subsequent RUN instruction, since docker passes ARG as an environment variable and can't know how it's used.

Then you could invoke docker like this:

docker build --build-arg REV=$(svn info --show-item revision http://llvm.org/svn/llvm-project/llvm/trunk) .
kcc added a comment.Aug 11 2017, 4:12 PM

I'd avoid such extra complexity, after all this is just an example.
One can force the full rebuild with --no-cache. It'll take just a bit more time since most of the time is consumed by the compiler builds.
BTW, my old svn (1.8.8, Ubuntu 14.04) does't have "info --show-item revision"

I'd avoid such extra complexity, after all this is just an example.

Understood... LGTM

BTW, my old svn (1.8.8, Ubuntu 14.04) does't have "info --show-item revision"

Guess my new macbook pro spoiled me...

kcc closed this revision.Aug 11 2017, 6:27 PM