| 1 |
# Enable Windows runfiles symlinks. Bazel does not support startup:windows, so |
| 2 |
# this must be a plain startup option; non-Windows Bazel ignores it with a |
| 3 |
# warning-free no-op. |
| 4 |
startup --windows_enable_symlinks |
| 5 |
|
| 6 |
# Automatically apply platform-specific config sections (e.g. build:windows) |
| 7 |
common --enable_platform_specific_config |
| 8 |
|
| 9 |
# Materialize a real runfiles tree on Windows so the Node js_test can reach its |
| 10 |
# staged sandbox directory (node/test/sandbox) by ordinary file paths; otherwise |
| 11 |
# Bazel uses a runfiles manifest and the sandbox is not a real directory tree. |
| 12 |
build:windows --enable_runfiles |
| 13 |
|
| 14 |
# Enable C++17 for MSVC on Windows |
| 15 |
build:windows --cxxopt=/std:c++17 |
| 16 |
build:windows --host_cxxopt=/std:c++17 |
| 17 |
|
| 18 |
# Enable C++17 for GCC/Clang on Linux and macOS |
| 19 |
build:linux --cxxopt=-std=c++17 |
| 20 |
build:linux --host_cxxopt=-std=c++17 |
| 21 |
build:macos --cxxopt=-std=c++17 |
| 22 |
build:macos --host_cxxopt=-std=c++17 |
| 23 |
|
| 24 |
# BuildBuddy.io: BES + remote cache (safe to use on any platform). |
| 25 |
# Pass the API key with both: |
| 26 |
# --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY (remote cache/exec) |
| 27 |
# --bes_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY (build event stream) |
| 28 |
build:buildbuddy --bes_results_url=https://app.buildbuddy.io/invocation/ |
| 29 |
build:buildbuddy --bes_backend=grpcs://remote.buildbuddy.io |
| 30 |
build:buildbuddy --remote_cache=grpcs://remote.buildbuddy.io |
| 31 |
build:buildbuddy --remote_cache_compression |
| 32 |
build:buildbuddy --remote_timeout=10m |
| 33 |
build:buildbuddy --build_metadata=VISIBILITY=PUBLIC |
| 34 |
|
| 35 |
build:linux-x86_64-remote --config=buildbuddy |
| 36 |
build:linux-x86_64-remote --remote_executor=grpcs://remote.buildbuddy.io |
| 37 |
build:linux-x86_64-remote --host_platform=@toolchains_buildbuddy//platforms:linux_x86_64 |
| 38 |
build:linux-x86_64-remote --platforms=@toolchains_buildbuddy//platforms:linux_x86_64 |
| 39 |
build:linux-x86_64-remote --extra_execution_platforms=@toolchains_buildbuddy//platforms:linux_x86_64 |
| 40 |
build:linux-x86_64-remote --remote_download_minimal |
| 41 |
build:linux-x86_64-remote --define=EXECUTOR=remote |
| 42 |
|
| 43 |
build:linux-arm64-remote --config=buildbuddy |
| 44 |
build:linux-arm64-remote --remote_executor=grpcs://remote.buildbuddy.io |
| 45 |
build:linux-arm64-remote --host_platform=@toolchains_buildbuddy//platforms:linux_arm64 |
| 46 |
build:linux-arm64-remote --platforms=@toolchains_buildbuddy//platforms:linux_arm64 |
| 47 |
build:linux-arm64-remote --extra_execution_platforms=@toolchains_buildbuddy//platforms:linux_arm64 |
| 48 |
build:linux-arm64-remote --remote_download_minimal |
| 49 |
build:linux-arm64-remote --define=EXECUTOR=remote |
| 50 |
|
| 51 |
# ── Node.js opencc.node prebuild configs ────────────────────────────────────── |
| 52 |
# Build opencc.node for Linux x64 using BuildBuddy remote execution. |
| 53 |
# Usage: bazel build --config=node-linux-x64 //node:opencc_node |
| 54 |
build:node-linux-x64 --config=linux-x86_64-remote |
| 55 |
|
| 56 |
# Build opencc.node for Linux arm64 using BuildBuddy remote execution. |
| 57 |
# Usage: bazel build --config=node-linux-arm64 //node:opencc_node |
| 58 |
build:node-linux-arm64 --config=linux-arm64-remote |
| 59 |
|
| 60 |
# Build Windows x64 opencc.node locally on macOS/Linux using Zig. |
| 61 |
# Requires zig in PATH, or pass --action_env=ZIG=/path/to/zig. |
| 62 |
# Usage: bazel build --config=node-windows-x64-zig //node:opencc_node_windows_zig |
| 63 |
build:node-windows-x64-zig --action_env=ZIG |
| 64 |
|
| 65 |
# Optional user/CI overrides (e.g. injecting BuildBuddy API key in CI). |
| 66 |
try-import %workspace%/.bazelrc.user |