Base: codex-main originale (prima del fork aKode)
This commit is contained in:
1
bazel/platforms/BUILD.bazel
Normal file
1
bazel/platforms/BUILD.bazel
Normal file
@@ -0,0 +1 @@
|
||||
# Release platform rules live in this package.
|
||||
30
bazel/platforms/release_binaries.bzl
Normal file
30
bazel/platforms/release_binaries.bzl
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Rules for building release binaries across supported target platforms."""
|
||||
|
||||
load("@rules_platform//platform_data:defs.bzl", "platform_data")
|
||||
|
||||
_PLATFORM_TRIPLES = {
|
||||
"linux_arm64_musl": "aarch64-unknown-linux-musl",
|
||||
"linux_amd64_musl": "x86_64-unknown-linux-musl",
|
||||
"macos_amd64": "x86_64-apple-darwin",
|
||||
"macos_arm64": "aarch64-apple-darwin",
|
||||
"windows_amd64": "x86_64-pc-windows-msvc",
|
||||
"windows_arm64": "aarch64-pc-windows-msvc",
|
||||
}
|
||||
|
||||
PLATFORMS = _PLATFORM_TRIPLES.keys()
|
||||
|
||||
def multiplatform_binaries(name, platforms = PLATFORMS):
|
||||
"""Build a binary for a subset of the declared release platforms."""
|
||||
for platform in platforms:
|
||||
platform_data(
|
||||
name = name + "_" + platform,
|
||||
platform = "@rules_rs//rs/platforms:" + _PLATFORM_TRIPLES[platform],
|
||||
target = name,
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
native.filegroup(
|
||||
name = "release_binaries",
|
||||
srcs = [name + "_" + platform for platform in platforms],
|
||||
tags = ["manual"],
|
||||
)
|
||||
Reference in New Issue
Block a user