summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/sandbox_internals/BUILD.gn
blob: e00a9658cf3b924df0a818752d628524ab2fbc08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2019 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.

import("//tools/grit/preprocess_if_expr.gni")
import("//tools/typescript/ts_library.gni")

assert(is_android || is_linux || is_chromeos || is_win)

preprocess_folder = "preprocessed"

if (is_win) {
  ts_files = [ "sandbox_internals_win.ts" ]
} else {
  ts_files = [ "sandbox_internals.ts" ]
}

preprocess_if_expr("preprocess") {
  in_folder = "."
  out_folder = "$target_gen_dir/$preprocess_folder"
  in_files = ts_files
}

ts_library("build_ts") {
  root_dir = "$target_gen_dir/$preprocess_folder"
  out_dir = "$target_gen_dir/tsc"
  in_files = ts_files

  if (is_android) {
    definitions = [ "./sandbox_android.d.ts" ]
  }

  deps = [ "//ui/webui/resources:library" ]
  extra_deps = [ ":preprocess" ]
}