Skip to content

Commit c26a522

Browse files
authored
[compiler-rt] Fix C and C++ compilers being switched when compiling tests (#110552)
The logic was simply switched. Fixes building tests for me. Not sure how I haven't stumbled upon this before considering this code hasn't changed lately and my setup's been the same. Fixes: 07317bb
1 parent 23c0850 commit c26a522

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/cmake/Modules/CompilerRTCompile.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ function(clang_compile object_file source)
7373
endif()
7474
string(REGEX MATCH "[.](cc|cpp)$" is_cxx ${source_rpath})
7575
if (is_cxx)
76-
set(compiler ${COMPILER_RT_TEST_COMPILER})
77-
else()
7876
set(compiler ${COMPILER_RT_TEST_CXX_COMPILER})
77+
else()
78+
set(compiler ${COMPILER_RT_TEST_COMPILER})
7979
endif()
8080
if(COMPILER_RT_STANDALONE_BUILD)
8181
# Only add global flags in standalone build.

0 commit comments

Comments
 (0)