aboutsummaryrefslogtreecommitdiff
path: root/third_party/closure_compiler/run_compiler
blob: 10f5609f8826e4f921221b37338128c72917d0aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set -e

readonly SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "$SCRIPT_DIR/../.."  # src/.

export GYP_GENERATORS="ninja"

tools/gyp/gyp --no-circular-check third_party/closure_compiler/compiled_resources2.gyp

os_name=`uname -s`
cores_count=1
case "$os_name" in
  "Darwin") cores_count=`sysctl -n hw.ncpu` ;;
  "Linux") cores_count=`nproc` ;;
esac

ninja -C out/Default -j $cores_count $@