зеркало из https://github.com/mozilla/sccache.git
Make sccache recognize clang-cl correctly
clang-cl defines both _MSC_VER and __clang__, so if __clang__ is checked first, sccache would think that it's clang, not MSVC.
This commit is contained in:
Родитель
7c87f05506
Коммит
8ff474eb9a
|
@ -87,12 +87,12 @@ class Compiler(object):
|
|||
fh, path = tempfile.mkstemp(suffix='.c')
|
||||
with os.fdopen(fh, 'w') as f:
|
||||
f.write(
|
||||
'#if defined(__clang__)\n'
|
||||
'#if defined(_MSC_VER)\n'
|
||||
'msvc\n'
|
||||
'#elif defined(__clang__)\n'
|
||||
'clang\n'
|
||||
'#elif defined(__GNUC__)\n'
|
||||
'gcc\n'
|
||||
'#elif defined(_MSC_VER)\n'
|
||||
'msvc\n'
|
||||
'#endif\n'
|
||||
)
|
||||
# Try preprocessing the above temporary file
|
||||
|
|
Загрузка…
Ссылка в новой задаче