forked from angular/universal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.bazel
51 lines (45 loc) · 1.19 KB
/
BUILD.bazel
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
package(default_visibility = ["//visibility:public"])
# Detect if the build is running under --stamp
config_setting(
name = "stamp",
values = {"stamp": "true"},
)
config_setting(
name = "linux_x86_64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)
config_setting(
name = "linux_arm64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:arm64",
],
)
config_setting(
name = "macos_x86_64",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:x86_64",
],
)
config_setting(
name = "macos_arm64",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:arm64",
],
)
filegroup(
name = "node_files",
srcs = select({
# We're assuming the target platform & the execution platform as the same here
"//:linux_x86_64": ["@nodejs_linux_amd64//:node_files"],
"//:linux_arm64": ["@nodejs_linux_arm64//:node_files"],
"//:macos_x86_64": ["@nodejs_darwin_amd64//:node_files"],
# Need a minimum of Node 16 for M1 support
# "//:macos_arm64": ["@nodejs_darwin_arm64//:node_files"],
}),
)