blob: 4b9541195487239a48d9cafb48a6b44335d7946b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env python
import os
import subprocess
import sys
def main():
if sys.platform == 'win32':
print(0)
else:
cc = os.environ.get('CC', 'cc')
try:
cc_is_clang = 'clang' in subprocess.check_output(
[cc, '--version'], universal_newlines=True)
except OSError:
# We probably just don't have CC/cc.
cc_is_clang = False
print(int(cc_is_clang))
if __name__ == '__main__':
main()
|