|
| 1 | +############################### |
| 2 | +# Filesystem interactions # |
| 3 | +############################### |
| 4 | + |
| 5 | +# Don't create bazel-* symlinks in the WORKSPACE directory. |
| 6 | +# These require .gitignore and may scare users. Also, it's a workaround for |
| 7 | +# https://github.com/bazelbuild/rules_typescript/issues/12 which affects the common case of |
| 8 | +# having `tsconfig.json` in the WORKSPACE directory. Instead, you should run |
| 9 | +# `bazel info output_base` to find out where the outputs went. |
| 10 | +build --symlink_prefix=/ |
| 11 | + |
| 12 | +# Performance: avoid stat'ing input files |
| 13 | +build --watchfs |
| 14 | + |
| 15 | +# Turn off legacy external runfiles |
| 16 | +build --nolegacy_external_runfiles |
| 17 | +run --nolegacy_external_runfiles |
| 18 | +test --nolegacy_external_runfiles |
| 19 | + |
| 20 | +# This flag is needed to so that the bazel cache is not invalidated |
| 21 | +# when running bazel via `yarn bazel`. |
| 22 | +build --incompatible_strict_action_env |
| 23 | + |
| 24 | +# Do not build runfile forests by default. If an execution strategy relies on runfile |
| 25 | +# forests, the forest is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627 |
| 26 | +# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df |
| 27 | +build --nobuild_runfile_links |
| 28 | + |
| 29 | +############################### |
| 30 | +# Output control # |
| 31 | +############################### |
| 32 | + |
| 33 | +# A more useful default output mode for bazel query |
| 34 | +# Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar" |
| 35 | +query --output=label_kind |
| 36 | + |
| 37 | +# By default, failing tests don't print any output, it goes to the log file |
| 38 | +test --test_output=errors |
| 39 | + |
| 40 | +################################# |
| 41 | +# Release configuration. # |
| 42 | +# Run with "--config=release" # |
| 43 | +################################# |
| 44 | + |
| 45 | +# Configures script to do version stamping. |
| 46 | +# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command |
| 47 | +build:release --workspace_status_command="node ./tools/bazel-stamp-vars.js" |
| 48 | +build:release --stamp |
| 49 | + |
| 50 | +################################ |
| 51 | +# View Engine / Ivy toggle # |
| 52 | +################################ |
| 53 | +build:view-engine --define=angular_ivy_enabled=False |
| 54 | +build:ivy --define=angular_ivy_enabled=True |
| 55 | + |
| 56 | +# Set Ivy as the default |
| 57 | +build --config=ivy |
| 58 | + |
| 59 | +################################ |
| 60 | +# --config=debug # |
| 61 | +################################ |
| 62 | + |
| 63 | +# Enable debugging tests with --config=debug |
| 64 | +test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results |
| 65 | + |
| 66 | +################################ |
| 67 | +# Local Environment Setup # |
| 68 | +# Needs to be last statement # |
| 69 | +################################ |
| 70 | +# Load any settings which are specific to the current user. Needs to be *last* statement |
| 71 | +# in this config, as the user configuration should be able to overwrite flags from this file. |
| 72 | +try-import .bazelrc.user |
0 commit comments