mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04: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
a9cc9d8bbc
commit
cbe08597c3
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