From 930ca76e3c296fa6816fc9f37e0384b57578ffba Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Tue, 23 Jul 2024 23:55:40 +0800 Subject: [PATCH] fix(build): use Configure directly to support cross build on openssl 1.1.1 --- build/openresty/openssl/openssl.bzl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build/openresty/openssl/openssl.bzl b/build/openresty/openssl/openssl.bzl index 400e2e880ef6..8bf672b2cd36 100644 --- a/build/openresty/openssl/openssl.bzl +++ b/build/openresty/openssl/openssl.bzl @@ -17,8 +17,13 @@ CONFIGURE_OPTIONS = select({ "@kong//:x86_64-linux-glibc-cross": [ "linux-x86_64", ], - # no extra args needed for "@kong//:x86_64-linux-musl-cross" or non-cross builds - "//conditions:default": [], + # non-cross build + "@platforms//cpu:x86_64": [ + "linux-x86_64", + ], + "@platforms//cpu:aarch64": [ + "linux-aarch64", + ], }) + [ "-g", "-O3", # force -O3 even we are using --debug (for example on CI) @@ -50,7 +55,7 @@ def build_openssl( configure_make( name = name, - configure_command = "config", + configure_command = "Configure", configure_in_place = True, configure_options = CONFIGURE_OPTIONS + extra_configure_options, env = select({