[compiler-rt] 056d024 - [compiler-rt] Use COMPILER_RT_TEST_CXX_COMPILER for linking compiler-rt tests

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 11:44:49 PDT 2021


Author: Leonard Chan
Date: 2021-09-08T11:44:00-07:00
New Revision: 056d024235f057e1c933a30aabb66e827f957279

URL: https://github.com/llvm/llvm-project/commit/056d024235f057e1c933a30aabb66e827f957279
DIFF: https://github.com/llvm/llvm-project/commit/056d024235f057e1c933a30aabb66e827f957279.diff

LOG: [compiler-rt] Use COMPILER_RT_TEST_CXX_COMPILER for linking compiler-rt tests

Before, COMPILER_RT_TEST_COMPILER was used which pointed to a C compiler. While
it is incorrect to assume either of these is the default compiler, using the
C++ one allows for linking cpp tests.

Differential Revision: https://reviews.llvm.org/D109207

Added: 
    

Modified: 
    compiler-rt/cmake/Modules/AddCompilerRT.cmake

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index bc69ec95c4195..97d898f394b9f 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -490,7 +490,7 @@ function(add_compiler_rt_test test_suite test_name arch)
   endif()
   add_custom_command(
     OUTPUT "${output_bin}"
-    COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"
+    COMMAND ${COMPILER_RT_TEST_CXX_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"
             ${TEST_LINK_FLAGS}
     DEPENDS ${TEST_DEPS}
     )


        


More information about the llvm-commits mailing list