forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
103 lines (83 loc) · 4.05 KB
/
.bazelrc
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
###############################
# Filesystem interactions #
###############################
# Don't create bazel-* symlinks in the WORKSPACE directory.
# These require .gitignore and may scare users. Also, it's a workaround for
# https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of
# having `tsconfig.json` in the WORKSPACE directory. Instead, you should run
# `bazel info output_base` to find out where the outputs went.
build --symlink_prefix=/
# Performance: avoid stat'ing input files
build --watchfs
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles
###############################
# Output control #
###############################
# A more useful default output mode for bazel query
# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar"
query --output=label_kind
# By default, failing tests don't print any output, it goes to the log file
test --test_output=errors
#################################
# Release configuration. #
# Run with "--config=release" #
#################################
# Configures script to do version stamping.
# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command
build:release --workspace_status_command="node ./tools/bazel-stamp-vars.js"
###############################
# Typescript / Angular / Sass #
###############################
# Make compilation fast, by keeping a few copies of the compilers
# running as daemons, and cache SourceFile AST's to reduce parse time.
build --strategy=TypeScriptCompile=worker
build --strategy=AngularTemplateCompile=worker
################################
# Temporary Settings for Ivy #
################################
# Use the legacy AOT compiler strategy. We don't want to compile with Ivy nor with "ngtsc" which
# does not generate factory files which are needed for AOT.
build --define=compile=legacy
################################
# Remote Execution Setup #
################################
# Use the Angular team internal GCP instance for remote execution.
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
build:remote --project_id=internal-200822
# Setup the build strategy for various types of actions. Mixing "local" and "remote"
# can cause unexpected results and we want to run everything remotely if possible.
build:remote --spawn_strategy=remote
build:remote --strategy=Javac=remote
build:remote --strategy=Closure=remote
build:remote --strategy=Genrule=remote
build:remote --define=EXECUTOR=remote
# Setup the remote build execution servers.
build:remote --remote_cache=remotebuildexecution.googleapis.com
build:remote --remote_executor=remotebuildexecution.googleapis.com
build:remote --tls_enabled=true
build:remote --auth_enabled=true
# Setup the toolchain and platform for the remote build execution. The platform
# is automatically configured by the "rbe_autoconfig" rule in the project workpsace.
build:remote --crosstool_top=@rbe_default//cc:toolchain
build:remote --host_javabase=@rbe_default//java:jdk
build:remote --javabase=@rbe_default//java:jdk
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --extra_execution_platforms=//tools:rbe_platform
build:remote --host_platform=//tools:rbe_platform
build:remote --platforms=//tools:rbe_platform
build:remote --extra_toolchains=@rbe_default//config:cc-toolchain
# Setup Build Event Service
build:remote --bes_backend=buildeventservice.googleapis.com
build:remote --bes_timeout=30s
build:remote --bes_results_url="https://source.cloud.google.com/results/invocations/"
# Set remote caching settings
build:remote --remote_accept_cached=true
################################
# Local Environment Setup #
################################
# Load any settings which are specific to the current user. Needs to be *last* statement
# in this config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user