--- compiler-rt/lib/builtins/CMakeLists.txt.orig +++ compiler-rt/lib/builtins/CMakeLists.txt @@ -867,12 +867,10 @@ endif() endif() endif() - check_c_source_compiles("_Float16 foo(_Float16 x) { return x; } - int main(void) { return 0; }" + check_c_source_compiles("_Float16 foo(_Float16 x) { return x; }" COMPILER_RT_HAS_${arch}_FLOAT16) append_list_if(COMPILER_RT_HAS_${arch}_FLOAT16 -DCOMPILER_RT_HAS_FLOAT16 BUILTIN_CFLAGS_${arch}) - check_c_source_compiles("__bf16 foo(__bf16 x) { return x; } - int main(void) { return 0; }" + check_c_source_compiles("__bf16 foo(__bf16 x) { return x; }" COMPILER_RT_HAS_${arch}_BFLOAT16) # Build BF16 files only when "__bf16" is available. if(COMPILER_RT_HAS_${arch}_BFLOAT16)