aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/compile_processors.py
blob: 72f23febdd7950526765aa18d9c70d771e3c711d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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]
dst = sys.argv[2]
processors = sys.argv[3:]
for p in processors:
    path, _ = os.path.splitext(p)
    filename = os.path.split(path)[1]
    subprocess.check_call([skslc, p, os.path.join(dst, filename + ".h")])
    subprocess.check_call([skslc, p, os.path.join(dst, filename + ".cpp")])