summaryrefslogtreecommitdiff
path: root/tools/build.py
blob: bbcd24762ddc62b5644f9e06ce854fc0c0df6eda (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 2018 the Deno authors. All rights reserved. MIT license.
from __future__ import print_function
import os
import sys
import third_party
from util import build_path, enable_ansi_colors, run

enable_ansi_colors()

third_party.fix_symlinks()

ninja_args = sys.argv[1:]
if not "-C" in ninja_args:
    if not os.path.isdir(build_path()):
        print("Build directory '%s' does not exist." % build_path(),
              "Run tools/setup.py")
        sys.exit(1)
    ninja_args = ["-C", build_path()] + ninja_args

run([third_party.ninja_path] + ninja_args,
    env=third_party.google_env(),
    quiet=True)