File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -397,9 +397,6 @@ class LLVMSlimBuilder(LLVMBuilder):
397397 def configure (self ):
398398 # yapf: disable
399399 slim_clang_defines = {
400- # Objective-C Automatic Reference Counting (we don't use Objective-C)
401- # https://clang.llvm.org/docs/AutomaticReferenceCounting.html
402- 'CLANG_ENABLE_ARCMT' : 'OFF' ,
403400 # We don't (currently) use the static analyzer and it saves cycles
404401 # according to Chromium OS:
405402 # https://crrev.com/44702077cc9b5185fc21e99485ee4f0507722f82
@@ -409,6 +406,16 @@ def configure(self):
409406 'CLANG_PLUGIN_SUPPORT' : 'OFF' ,
410407 }
411408
409+ # Objective-C Automatic Reference Counting (we don't use Objective-C)
410+ # https://clang.llvm.org/docs/AutomaticReferenceCounting.html
411+ # Disable this option only if it exists to prevent CMake warnings.
412+ # CLANG_ENABLE_ARCMT was deprecated in favor of CLANG_ENABLE_OBJC_REWRITER,
413+ # which is disabled by default.
414+ # https://github.com/llvm/llvm-project/commit/c4a019747c98ad9326a675d3cb5a70311ba170a2
415+ arcmt_cmakelists = Path (self .folders .source , 'clang/lib/ARCMigrate/CMakeLists.txt' )
416+ if arcmt_cmakelists .exists ():
417+ slim_clang_defines ['CLANG_ENABLE_ARCMT' ] = 'OFF'
418+
412419 llvm_build_runtime = self .cmake_defines .get ('LLVM_BUILD_RUNTIME' , 'ON' ) == 'ON'
413420 build_compiler_rt = self .project_is_enabled ('compiler-rt' ) and llvm_build_runtime
414421
You can’t perform that action at this time.
0 commit comments