cmake: Test the compiler before testing compiler flags

We used to test that the compiler works at all, before testing
compiler flags. But during some toolchain refactoring this got
re-arranged.

This commit corrects the ordering.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2021-11-11 12:48:28 +01:00 committed by Carles Cufí
commit dbe473bc83
2 changed files with 7 additions and 5 deletions

View file

@ -36,11 +36,6 @@ endif()
# -fmacro-prefix-map=${ZEPHYR_BASE}=
# Verify that the toolchain can compile a dummy file, if it is not we
# won't be able to test for compatibility with certain C flags.
zephyr_check_compiler_flag(C "" toolchain_is_ok)
assert(toolchain_is_ok "The toolchain is unable to build a dummy C file. See CMakeError.log.")
# In some cases the "final" things are not used at all and "_prebuilt"
# is the last station. See "logical_target_for_zephyr_elf" below for
# details.