is_clang.py 400 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. #
  3. # Copyright 2016 Google Inc.
  4. #
  5. # Use of this source code is governed by a BSD-style license that can be
  6. # found in the LICENSE file.
  7. import subprocess
  8. import sys
  9. cc,cxx = sys.argv[1:3]
  10. if ('clang' in subprocess.check_output('%s --version' % cc, shell=True) and
  11. 'clang' in subprocess.check_output('%s --version' % cxx, shell=True)):
  12. print 'true'
  13. else:
  14. print 'false'