Pass '-undefined error' non sysroot ldflag on macOS (#894)

This commit is contained in:
Thomas 2022-04-19 16:54:23 +01:00 committed by GitHub
parent e7eebefe88
commit cac46994c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,9 @@ def _make_tool_impl(ctx):
if absolute_ar == "libtool" or absolute_ar.endswith("/libtool"):
arflags.append("-o")
if os_name(ctx) == "macos":
non_sysroot_ldflags += ["-undefined", "error"]
env.update({
"AR": absolute_ar,
"ARFLAGS": _join_flags_list(ctx.workspace_name, arflags),