mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
[libc] warns about missing linting only in full build mode
Differential Revision: https://reviews.llvm.org/D101609
This commit is contained in:
@@ -42,7 +42,12 @@ else()
|
||||
--print-resource-dir not supported by host compiler")
|
||||
endif()
|
||||
|
||||
option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc" OFF)
|
||||
|
||||
option(LLVM_LIBC_ENABLE_LINTING "Enables linting of libc source files" OFF)
|
||||
if(LLVM_LIBC_ENABLE_LINTING AND (NOT LLVM_LIBC_FULL_BUILD))
|
||||
message(FATAL_ERROR "Cannot enable linting when full libc build is not enabled.")
|
||||
endif()
|
||||
if(LLVM_LIBC_ENABLE_LINTING)
|
||||
if("clang-tools-extra" IN_LIST LLVM_ENABLE_PROJECTS
|
||||
AND "clang" IN_LIST LLVM_ENABLE_PROJECTS)
|
||||
@@ -56,7 +61,7 @@ if(LLVM_LIBC_ENABLE_LINTING)
|
||||
To disable linting set LLVM_LIBC_ENABLE_LINTING to OFF
|
||||
(pass -DLLVM_LIBC_ENABLE_LINTING=OFF to cmake).")
|
||||
endif()
|
||||
else()
|
||||
elseif(LLVM_LIBC_FULL_BUILD)
|
||||
message(WARNING "
|
||||
Linting for libc is currently disabled.
|
||||
|
||||
@@ -64,8 +69,6 @@ else()
|
||||
(pass -DLLVM_LIBC_ENABLE_LINTING=ON to cmake).")
|
||||
endif()
|
||||
|
||||
option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc" OFF)
|
||||
|
||||
include(CMakeParseArguments)
|
||||
include(LLVMLibCRules)
|
||||
include(LLVMLibCCheckCpuFeatures)
|
||||
|
||||
Reference in New Issue
Block a user