don't forget libcxx and ar
This commit is contained in:
parent
65a8d7c4bb
commit
00e126ec85
|
@ -362,11 +362,23 @@ def declare_files(os):
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "{}_ar_files".format(target_config.zigtarget),
|
||||||
|
srcs = [
|
||||||
|
":zig",
|
||||||
|
":" + zig_tool_path(os).format(
|
||||||
|
zig_tool = "ar",
|
||||||
|
zigtarget = target_config.zigtarget,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "{}_all_files".format(target_config.zigtarget),
|
name = "{}_all_files".format(target_config.zigtarget),
|
||||||
srcs = [
|
srcs = [
|
||||||
":{}_linker_files".format(target_config.zigtarget),
|
":{}_linker_files".format(target_config.zigtarget),
|
||||||
":{}_compiler_files".format(target_config.zigtarget),
|
":{}_compiler_files".format(target_config.zigtarget),
|
||||||
|
":{}_ar_files".format(target_config.zigtarget),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ def declare_cc_toolchains(os, zig_sdk_path):
|
||||||
toolchain_identifier = zigtarget + "-toolchain",
|
toolchain_identifier = zigtarget + "-toolchain",
|
||||||
toolchain_config = ":%s_cc_config" % zigtarget,
|
toolchain_config = ":%s_cc_config" % zigtarget,
|
||||||
all_files = "@zig_sdk//:%s_all_files" % zigtarget,
|
all_files = "@zig_sdk//:%s_all_files" % zigtarget,
|
||||||
ar_files = "@zig_sdk//:zig",
|
ar_files = "@zig_sdk//:%s_ar_files" % zigtarget,
|
||||||
compiler_files = "@zig_sdk//:%s_compiler_files" % zigtarget,
|
compiler_files = "@zig_sdk//:%s_compiler_files" % zigtarget,
|
||||||
linker_files = "@zig_sdk//:%s_linker_files" % zigtarget,
|
linker_files = "@zig_sdk//:%s_linker_files" % zigtarget,
|
||||||
dwp_files = "@zig_sdk//:empty",
|
dwp_files = "@zig_sdk//:empty",
|
||||||
|
|
|
@ -22,6 +22,8 @@ _GLIBCS = [
|
||||||
"2.34",
|
"2.34",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
_INCLUDE_TAIL = ["libcxx/include", "include"]
|
||||||
|
|
||||||
LIBCS = ["musl"] + ["gnu.{}".format(glibc) for glibc in _GLIBCS]
|
LIBCS = ["musl"] + ["gnu.{}".format(glibc) for glibc in _GLIBCS]
|
||||||
|
|
||||||
def zig_tool_path(os):
|
def zig_tool_path(os):
|
||||||
|
@ -51,8 +53,7 @@ def _target_darwin(gocpu, zigcpu):
|
||||||
"libc/include/{}-macos.{}-none".format(zigcpu, min_os),
|
"libc/include/{}-macos.{}-none".format(zigcpu, min_os),
|
||||||
"libc/include/any-macos.{}-any".format(min_os),
|
"libc/include/any-macos.{}-any".format(min_os),
|
||||||
"libc/include/any-macos-any",
|
"libc/include/any-macos-any",
|
||||||
"include",
|
] + _INCLUDE_TAIL,
|
||||||
],
|
|
||||||
dynamic_library_linkopts = ["-Wl,-undefined=dynamic_lookup"],
|
dynamic_library_linkopts = ["-Wl,-undefined=dynamic_lookup"],
|
||||||
copts = [],
|
copts = [],
|
||||||
libc = "darwin",
|
libc = "darwin",
|
||||||
|
@ -72,8 +73,7 @@ def _target_windows(gocpu, zigcpu):
|
||||||
"libc/mingw",
|
"libc/mingw",
|
||||||
"libunwind/include",
|
"libunwind/include",
|
||||||
"libc/include/any-windows-any",
|
"libc/include/any-windows-any",
|
||||||
"include",
|
] + _INCLUDE_TAIL,
|
||||||
],
|
|
||||||
dynamic_library_linkopts = [],
|
dynamic_library_linkopts = [],
|
||||||
copts = [],
|
copts = [],
|
||||||
libc = "mingw",
|
libc = "mingw",
|
||||||
|
@ -103,8 +103,7 @@ def _target_linux_gnu(gocpu, zigcpu, glibc_version):
|
||||||
(["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []) +
|
(["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []) +
|
||||||
(["libc/include/{}-linux-any".format(zigcpu)] if zigcpu != "x86_64" else []) + [
|
(["libc/include/{}-linux-any".format(zigcpu)] if zigcpu != "x86_64" else []) + [
|
||||||
"libc/include/any-linux-any",
|
"libc/include/any-linux-any",
|
||||||
"include",
|
] + _INCLUDE_TAIL,
|
||||||
],
|
|
||||||
toplevel_include = ["glibc-hacks"] if fcntl_hack else [],
|
toplevel_include = ["glibc-hacks"] if fcntl_hack else [],
|
||||||
compiler_extra_includes = ["glibc-hacks/glibchack-fcntl.h"] 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 [],
|
linker_version_scripts = ["glibc-hacks/fcntl.map"] if fcntl_hack else [],
|
||||||
|
@ -132,8 +131,7 @@ def _target_linux_musl(gocpu, zigcpu):
|
||||||
(["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []) +
|
(["libc/include/x86-linux-any"] if zigcpu == "x86_64" else []) +
|
||||||
(["libc/include/{}-linux-any".format(zigcpu)] if zigcpu != "x86_64" else []) + [
|
(["libc/include/{}-linux-any".format(zigcpu)] if zigcpu != "x86_64" else []) + [
|
||||||
"libc/include/any-linux-any",
|
"libc/include/any-linux-any",
|
||||||
"include",
|
] + _INCLUDE_TAIL,
|
||||||
],
|
|
||||||
dynamic_library_linkopts = [],
|
dynamic_library_linkopts = [],
|
||||||
copts = ["-D_LIBCPP_HAS_MUSL_LIBC", "-D_LIBCPP_HAS_THREAD_API_PTHREAD"],
|
copts = ["-D_LIBCPP_HAS_MUSL_LIBC", "-D_LIBCPP_HAS_THREAD_API_PTHREAD"],
|
||||||
libc = "musl",
|
libc = "musl",
|
||||||
|
|
Loading…
Reference in New Issue