This was changed in rL276151 and causes problems if the C++ compiler does not support the same arches as the C compiler.
For the builtins, only the C compiler is tested in try_compile_only.
Additionally, -fno-exceptions is passed in (if available) to work around the case where no libunwind is available.