diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -271,6 +271,9 @@ # specific architecture. When cross-compiling, this is controled via # COMPILER_RT_TEST_COMPILER and COMPILER_RT_TEST_COMPILER_CFLAGS. macro(get_test_cc_for_arch arch cc_out cflags_out) + if (NOT ${ARGC} EQUAL 3) + message(FATAL_ERROR "got too many args. expected 3, got ${ARGC} (namely: ${ARGV})") + endif() if(ANDROID OR (NOT APPLE AND ${arch} MATCHES "arm|aarch64|riscv32|riscv64")) # This is only true if we are cross-compiling. # Build all tests with host compiler and use host tools.