compiler_wrapper: Use syscall.exec on platforms other than Chrome OS

In, it's reported that golang exec don't play well on
Chrome OS, portage sandbox to be exact. That's when we start to use
libc's exec. However, the wrapper is also used on non-Chrome OS
platforms, such as Android, and linking against libc has no benefit,
and might be the root cause of a recent bug.

This patch adds code to selectively use Golang's or libc's exec,
depending on the platform.

TEST=Build the wrapper locally with Chrome OS and Android configurations

Change-Id: Ifd6fa8223205536450b65f728060d7c5556d7619
Tested-by: Tiancong Wang <>
Commit-Queue: Tiancong Wang <>
Reviewed-by: George Burgess <>
4 files changed