1
Fork 0

Fix include paths when targeting non-x86_64 archs.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This commit is contained in:
Piotr Sikora 2022-01-16 15:55:41 -08:00 committed by Motiejus Jakštys
parent 2acf0f6e45
commit 230da38f54
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ def _target_linux_gnu(gocpu, zigcpu, glibc_version = ""):
"libc/include/any-linux-any",
"libc/include/{}-linux-gnu".format(zigcpu),
"libc/include/{}-linux-any".format(zigcpu),
] + ["libc/include/x86-linux-any"] if zigcpu == "x86_64" else [],
] + (["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []),
toplevel_include = ["glibc-hacks"] if fcntl_hack else [],
compiler_extra_includes = ["glibc-hacks/glibchack-fcntl.h"] if fcntl_hack else [],
linker_version_scripts = ["glibc-hacks/fcntl.map"] if fcntl_hack else [],
@ -126,7 +126,7 @@ def _target_linux_musl(gocpu, zigcpu):
"libc/include/any-linux-any",
"libc/include/{}-linux-musl".format(zigcpu),
"libc/include/{}-linux-any".format(zigcpu),
] + ["libc/include/x86-linux-any"] if zigcpu == "x86_64" else [],
] + (["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []),
linkopts = ["-s", "-w"],
copts = ["-D_LIBCPP_HAS_MUSL_LIBC", "-D_LIBCPP_HAS_THREAD_API_PTHREAD"],
bazel_target_cpu = "k8",