GN: support compiler_prefix, use it for ccache on bots.
authormtklein <mtklein@chromium.org>
Fri, 26 Aug 2016 20:43:19 +0000 (13:43 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Aug 2016 20:43:19 +0000 (13:43 -0700)
commitcab0bb7fc694a59de379befb6062f48fdd1b731c
treef33143be4fe35a7988ceffead5a172e0d0a87ade
parent4871f2277738fa7e9232d25424c008b36dae4711
GN: support compiler_prefix, use it for ccache on bots.

This makes it considerably easier to use ccache with the Android NDK.
You can now just set
  compiler_prefix = "ccache"
  ndk = "/path/to/ndk"
and we'll use the NDK clang, wrapped with ccache.

The name compiler_prefix is stolen from / compatible with Chrome.

If you have ccache, you can just always leave compiler_prefix="ccache" enabled.
This should make it an unusual thing for humans to have to change cc or cxx.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281163002

Review-Url: https://codereview.chromium.org/2281163002
gn/BUILD.gn
infra/bots/recipe_modules/flavor/gn_flavor.py
infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-x86_64-Debug-GN.json
infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-GN.json
infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-GCC-x86_64-Release-Fast.json
infra/bots/recipes/swarm_compile.expected/Build-Win-MSVC-x86-Release-GN.json