Skip to content

Commit

Permalink
fix(build): unset LD env var in libtool build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Sep 10, 2024
1 parent 98b7c3c commit b69d538
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
9 changes: 1 addition & 8 deletions build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,12 @@ configure_make(
configure_command = "configure",
configure_in_place = True,
configure_options = select({
"@kong//:aarch64-linux-glibc-cross": [
"--host=aarch64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-glibc-cross": [
"--host=x86_64-unknown-linux-gnu",
],
"//conditions:default": [],
}) + select({
":disable-obsolete-api": [
"--enable-obsolete-api=no",
],
"//conditions:default": [],
}),
configure_xcompile = True, # enable automatic cross compile detection
lib_source = ":all_srcs",
# out_lib_dir = "lib",
out_shared_libs = select({
Expand Down
18 changes: 9 additions & 9 deletions build/cross_deps/libyaml/BUILD.libyaml.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ configure_make(
name = "libyaml",
configure_command = "configure",
configure_in_place = True,
configure_options = select({
"@kong//:aarch64-linux-glibc-cross": [
"--host=aarch64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-glibc-cross": [
"--host=x86_64-unknown-linux-gnu",
],
"//conditions:default": [],
}),
configure_xcompile = True, # enable automatic cross compile detection
lib_source = ":all_srcs",
env = select({
"@kong//:any-cross": {
# unset the LD env as in cross compile we use `gcc` instead of `ld`
# regression from https://github.com/bazelbuild/rules_foreign_cc/commit/c62e551f9f980adc512aee03ba4f6988e34e30ac
"LD": "",
},
"//conditions:default": {},
}),
# out_lib_dir = "lib",
out_shared_libs = select({
"@platforms//os:macos": [
Expand Down
18 changes: 9 additions & 9 deletions build/libexpat/BUILD.libexpat.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ configure_make(
"--without-xmlwf",
"--without-examples",
"--without-docbook",
] + select({
"@kong//:aarch64-linux-glibc-cross": [
"--host=aarch64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-glibc-cross": [
"--host=x86_64-unknown-linux-gnu",
],
"//conditions:default": [],
}),
]
configure_xcompile = True, # enable automatic cross compile detection,
env = select({
"@platforms//os:macos": {
# don't use rule_foreign_cc's libtool as archiver as it seems to be a bug
# see https://github.com/bazelbuild/rules_foreign_cc/issues/947
"AR": "/usr/bin/ar",
},
"//conditions:default": {},
}) | select({
"@kong//:any-cross": {
# unset the LD env as in cross compile we use `gcc` instead of `ld`
# regression from https://github.com/bazelbuild/rules_foreign_cc/commit/c62e551f9f980adc512aee03ba4f6988e34e30ac
"LD": "",
},
"//conditions:default": {},
}),
lib_source = ":all_srcs",
out_include_dir = "include/libexpat", # don't install headers
Expand Down

0 comments on commit b69d538

Please sign in to comment.