• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2# Copyright 2016 the V8 project authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import os
7import subprocess
8import sys
9
10GCMOLE_PATH = os.path.dirname(os.path.abspath(__file__))
11CLANG_BIN = os.path.join(GCMOLE_PATH, 'gcmole-tools', 'bin')
12CLANG_PLUGINS = os.path.join(GCMOLE_PATH, 'gcmole-tools')
13LUA = os.path.join(GCMOLE_PATH, 'gcmole-tools', 'lua52')
14DRIVER = os.path.join(GCMOLE_PATH, 'gcmole.lua')
15BASE_PATH = os.path.dirname(os.path.dirname(GCMOLE_PATH))
16
17assert len(sys.argv) == 2
18
19sys.exit(subprocess.call(
20    [LUA, DRIVER, sys.argv[1]],
21    env={'CLANG_BIN': CLANG_BIN, 'CLANG_PLUGINS': CLANG_PLUGINS},
22    cwd=BASE_PATH,
23))
24