From bd537a23b64e418269d0ed33914daac51517589e Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Wed, 2 Sep 2026 12:43:03 -0700 Subject: [PATCH] Fix flto cflag replacement --- recipe/install_base.sh | 6 +++++- recipe/meta.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipe/install_base.sh b/recipe/install_base.sh index 296e5d1f3..bcd2aa3c5 100644 --- a/recipe/install_base.sh +++ b/recipe/install_base.sh @@ -40,7 +40,7 @@ unset _CONDA_PYTHON_SYSCONFIGDATA_NAME declare -a LTO_CFLAGS=() if [[ ${_OPTIMIZED} == yes ]]; then - if [[ ${CC} =~ .*gcc.* ]]; then + if [[ ${c_compiler} =~ .*gcc.* ]]; then LTO_CFLAGS+=(-fuse-linker-plugin) LTO_CFLAGS+=(-ffat-lto-objects) # -flto must come after -flto-partition due to the replacement code @@ -68,6 +68,10 @@ if [[ ${_OPTIMIZED} == yes ]]; then _FLAGS_REPLACE+=("") _FLAGS_REPLACE+=("-L.") _FLAGS_REPLACE+=("") + _FLAGS_REPLACE+=(-flto-partition=none) + _FLAGS_REPLACE+=("") + _FLAGS_REPLACE+=(-flto) + _FLAGS_REPLACE+=("") for _LTO_CFLAG in "${LTO_CFLAGS[@]}"; do _FLAGS_REPLACE+=(${_LTO_CFLAG}) _FLAGS_REPLACE+=("") diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bff61c150..04fa0972b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -4,7 +4,7 @@ {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} {% set ver3nd = ''.join(version.split('.')[0:3]) %} -{% set build_number = 5 %} +{% set build_number = 6 %} # this makes the linter happy {% set channel_targets = channel_targets or 'conda-forge main' %}