fa78f3b1cb
python 2.7 subprocess.check_output: "Run command with arguments and return its output as a byte string." python 3 ubprocess.check_output: "By default, this function will return the data as encoded bytes." Using a 'b' prefix seems to cover both cases. Change-Id: Ie2d90bc93d0e98a723a262fae63fe538137812c5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299382 Commit-Queue: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
19 lines
442 B
Python
Executable File
19 lines
442 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
from __future__ import print_function
|
|
|
|
import subprocess
|
|
import sys
|
|
cc,cxx = sys.argv[1:3]
|
|
|
|
if (b'clang' in subprocess.check_output('%s --version' % cc, shell=True) and
|
|
b'clang' in subprocess.check_output('%s --version' % cxx, shell=True)):
|
|
print('true')
|
|
else:
|
|
print('false')
|