Skip to content

Commit

Permalink
feat(build): use automatic cross compile detection for configure_make
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Sep 10, 2024
1 parent ef0fc7f commit e1f80db
Show file tree
Hide file tree
Showing 3 changed files with 4 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, # use automatic cross compile detection
lib_source = ":all_srcs",
# out_lib_dir = "lib",
out_shared_libs = select({
Expand Down
10 changes: 1 addition & 9 deletions build/cross_deps/libyaml/BUILD.libyaml.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ 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, # use automatic cross compile detection
lib_source = ":all_srcs",
# out_lib_dir = "lib",
out_shared_libs = select({
Expand Down
11 changes: 2 additions & 9 deletions build/libexpat/BUILD.libexpat.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ 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, # use 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
Expand Down

0 comments on commit e1f80db

Please sign in to comment.