mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-12 01:14:28 -05:00
bazel: define common platforms for multi-platform builds
Default platform for targeting Constellation OS images with nix and cgo: //bazel/platforms:constellation_os Other target platforms with nix and cgo: //bazel/platforms:aarch64-darwin_nix //bazel/platforms:aarch64-linux_nix //bazel/platforms:x86_64-darwin_nix //bazel/platforms:x86_64-linux_nix Pure go platforms (no cgo, statically linked) //bazel/platforms:go-pure_aarch64-darwin //bazel/platforms:go-pure_aarch64-linux //bazel/platforms:go-pure_x86_64-darwin //bazel/platforms:go-pure_x86_64-linux
This commit is contained in:
parent
581ae0f92a
commit
a9d298890c
65
bazel/platforms/BUILD.bazel
Normal file
65
bazel/platforms/BUILD.bazel
Normal file
@ -0,0 +1,65 @@
|
||||
alias(
|
||||
name = "constellation_os",
|
||||
actual = ":x86_64-linux_nix",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "aarch64-linux_nix",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:aarch64",
|
||||
"@platforms//os:linux",
|
||||
"@rules_nixpkgs_core//constraints:support_nix",
|
||||
],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "aarch64-darwin_nix",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:aarch64",
|
||||
"@platforms//os:macos",
|
||||
"@rules_nixpkgs_core//constraints:support_nix",
|
||||
],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "x86_64-linux_nix",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:linux",
|
||||
"@rules_nixpkgs_core//constraints:support_nix",
|
||||
],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "x86_64-darwin_nix",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:macos",
|
||||
"@rules_nixpkgs_core//constraints:support_nix",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "go-pure_aarch64-linux",
|
||||
actual = "@io_bazel_rules_go//go/toolchain:linux_arm64",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "go-pure_aarch64-darwin",
|
||||
actual = "@io_bazel_rules_go//go/toolchain:darwin_arm64",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "go-pure_x86_64-linux",
|
||||
actual = "@io_bazel_rules_go//go/toolchain:linux_amd64",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "go-pure_x86_64-darwin",
|
||||
actual = "@io_bazel_rules_go//go/toolchain:darwin_amd64",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
Loading…
Reference in New Issue
Block a user