IMPALA-4701: make distcc work reliably with clang
The previous compiler-switching method in distcc had some problems:
- It duplicated logic from CMakeLists.txt in choosing flags to pass to
- In order to switch to ASAN, you needed to remember to change distcc
- The wrapper script approach interacted badly with ccache - GCC and
Clang-generated artifacts would be treated as equivalent by ccache,
meaning that if you accidentally build with the wrong compiler setting
and the artifacts got into the cache you needed to clear ccache.
Instead of using environment variables to set the compiler, we now
pass the compiler as an argument to distcc.sh and set things up
in CMakeLists.txt the same way as ccache. Switching to/from
clang builds now requires no extra step (aside from cleaning
out the cmake-generated files with clean.sh).
Also changes the name of the config file
Tested switching between debug and asan builds locally.
Reviewed-by: Tim Armstrong <firstname.lastname@example.org>
Tested-by: Impala Public Jenkins