1

Fix and adjust darwin libc header paths depending on CPU

This commit is contained in:
Ken Micklas 2022-02-10 18:24:21 -05:00 committed by Motiejus Jakštys
parent 77688d0a45
commit 9ede1507c3

View File

@ -54,15 +54,17 @@ _GLIBCS = [
]
def _target_darwin(gocpu, zigcpu):
min_os = "10"
if zigcpu == "aarch64":
min_os = "11"
return struct(
gotarget = "darwin_{}".format(gocpu),
zigtarget = "{}-macos-gnu".format(zigcpu),
includes = [
"libunwind/include",
# FIXME: add macos.10, macos.11 and macos.12 targets,
# and adjust the includes
"libc/include/{}-macos.10-gnu".format(zigcpu),
"libc/include/{}-macos-any".format(zigcpu),
# TODO: Define a toolchain for each minimum OS version
"libc/include/{}-macos.{}-gnu".format(zigcpu, min_os),
"libc/include/any-macos.{}-any".format(min_os),
"libc/include/any-macos-any",
],
linkopts = [],