From b3df14b6c98702ce50401fd039852787373e4676 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Thu, 10 Mar 2022 11:47:09 +0200 Subject: [runtimes] [CMake] Unify variable names Avoid repeating CMake checks across runtimes by unifying names of variables used for results to leverage CMake caching. Differential Revision: https://reviews.llvm.org/D110005 --- runtimes/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtimes') diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 613a28901d67..b23025177bac 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -110,12 +110,12 @@ endif() # Check for -nostdlib++ first; if there's no C++ standard library yet, # all check_cxx_compiler_flag commands will fail until we add -nostdlib++ # (or -nodefaultlibs). -llvm_check_compiler_linker_flag(C "-nostdlib++" LLVM_RUNTIMES_SUPPORT_NOSTDLIBXX_FLAG) -if (LLVM_RUNTIMES_SUPPORT_NOSTDLIBXX_FLAG) +llvm_check_compiler_linker_flag(C "-nostdlib++" CXX_SUPPORTS_NOSTDLIBXX_FLAG) +if (CXX_SUPPORTS_NOSTDLIBXX_FLAG) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nostdlib++") endif() -check_cxx_compiler_flag(-nostdinc++ LLVM_RUNTIMES_SUPPORT_NOSTDINCXX_FLAG) -if (LLVM_RUNTIMES_SUPPORT_NOSTDINCXX_FLAG) +check_cxx_compiler_flag(-nostdinc++ CXX_SUPPORTS_NOSTDINCXX_FLAG) +if (CXX_SUPPORTS_NOSTDINCXX_FLAG) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nostdinc++") endif() -- cgit v1.2.1