]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106212: Raise when using c-analyzer with clang on darwin (#110757)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Fri, 13 Oct 2023 08:52:30 +0000 (10:52 +0200)
committerGitHub <noreply@github.com>
Fri, 13 Oct 2023 08:52:30 +0000 (10:52 +0200)
Tools/c-analyzer/c_parser/preprocessor/__init__.py

index cdc1a4e12690594ab68d45b027aa95c848df2663..30a86cbd7dc494e32ac141a591b85086730102af 100644 (file)
@@ -2,6 +2,7 @@ import contextlib
 import logging
 import os
 import os.path
+import platform
 import re
 import sys
 
@@ -242,6 +243,8 @@ def _get_default_compiler():
         return 'unix'
     if os.name == 'nt':
         return 'msvc'
+    if sys.platform == 'darwin' and 'clang' in platform.python_compiler():
+        return 'clang'
     return 'unix'