From 5fda89869402d62773c4a71a2d19e950afcad8d5 Mon Sep 17 00:00:00 2001 From: Robert Minsk Date: Mon, 18 Mar 2024 19:26:44 -0700 Subject: [PATCH] feat(python-build): Add PACKAGE_LDFLAGS to support custom LDFLAGS per package --- plugins/python-build/bin/python-build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index a30f6697..4c7b8fe0 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -810,6 +810,7 @@ build_package_standard_build() { local PACKAGE_MAKE_OPTS="${package_var_name}_MAKE_OPTS" local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]" local PACKAGE_CFLAGS="${package_var_name}_CFLAGS" + local PACKAGE_LDFLAGS="${package_var_name}_LDFLAGS" if [ "$package_var_name" = "PYTHON" ]; then use_homebrew || true @@ -827,6 +828,9 @@ build_package_standard_build() { ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}" fi + if [ "${LDFLAGS+defined}" ] || [ "${!PACKAGE_LDFLAGS+defined}" ]; then + export LDFLAGS="$LDFLAGS ${!PACKAGE_LDFLAGS}" + fi if [ -z "$CC" ] && is_mac -ge 1010; then export CC=clang fi