There were existing calls to try_compile_only() with arguments not
prefixed by SOURCE or FLAGS. These were silently being ignored.
It looks like the SOURCE and FLAGS arguments were first introduced
One implication of this is that for a builtins only build for Darwin
(see darwin_test_archs()) it would mean we weren't actually passing
-arch <arch> to the compiler). This would result in compiler-rt
claiming all supplied architectures could be targetted provided
the compiler could build for Clang's default architecture.
This patch fixes this in several ways.
- Fixes all incorrect calls to try_compile_only().
- Adds code to try_compile_only() to check for unhandled arguments and raises a fatal error if this occurs. This should stop any incorrect calls in the future.
- Improve the documentation on try_compile_only() which seemed completely wrong.