aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/compile_processors.py
blob: fabdbc2a7000cba7ee0e44c77d78608e64613147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
#
# Copyright 2017 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import subprocess
import sys

skslc = sys.argv[1]
processors = sys.argv[2:]
for p in processors:
    path, _ = os.path.splitext(p)
    print("Recompiling " + p + "...")
    try:
        subprocess.check_output([skslc, p, path + ".h"])
        subprocess.check_output([skslc, p, path + ".cpp"])
    except subprocess.CalledProcessError as err:
        print("### Error compiling " + p + ":")
        print(err.output)
        exit(1)