wip macos
motiejus@mtwork:/code/bazel-zig-cc$ bazel build --spawn_strategy=local --platforms @zig_sdk//libc_aware/platform:macos_aarch64_sdk.13.1 test/c:which_libc
INFO: Analyzed target //test/c:which_libc (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //test/c:which_libc up-to-date:
bazel-bin/test/c/which_libc
INFO: Elapsed time: 0.071s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
motiejus@mtwork:/code/bazel-zig-cc$ file bazel-bin/test/c/which_libc
bazel-bin/test/c/which_libc: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>
motiejus@mtwork:/code/bazel-zig-cc$
This commit is contained in:
@@ -14,7 +14,7 @@ def declare_platforms():
|
||||
for os in oss:
|
||||
declare_platform(gocpu, zigcpu, bzlos, os)
|
||||
|
||||
def declare_libc_aware_platforms():
|
||||
def declare_libc_aware_platforms(macos_sdk_versions):
|
||||
# create @zig_sdk//{os}_{arch}_platform entries with zig and go conventions
|
||||
# with libc specified
|
||||
for zigcpu, gocpu in _CPUS:
|
||||
@@ -27,6 +27,15 @@ def declare_libc_aware_platforms():
|
||||
suffix = "_{}".format(libc),
|
||||
extra_constraints = ["@zig_sdk//libc:{}".format(libc)],
|
||||
)
|
||||
for macos_sdk_version in macos_sdk_versions:
|
||||
declare_platform(
|
||||
gocpu,
|
||||
zigcpu,
|
||||
"macos",
|
||||
"macos",
|
||||
suffix = "_sdk.{}".format(macos_sdk_version),
|
||||
extra_constraints = ["@zig_sdk//libc:macos.{}".format(macos_sdk_version)],
|
||||
)
|
||||
|
||||
def declare_platform(gocpu, zigcpu, bzlos, os, suffix = "", extra_constraints = []):
|
||||
constraint_values = [
|
||||
|
||||
Reference in New Issue
Block a user