Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions recipe/install_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ VER=${PKG_VERSION%.*}
_buildd_static=build-static
_buildd_shared=build-shared

# For debugging builds, set this to no to disable profile-guided optimization
if [[ ${PY_INTERP_DEBUG} == yes ]]; then
_OPTIMIZED=no
DBG=d
else
_OPTIMIZED=yes
DBG=
fi

Expand All @@ -35,6 +38,24 @@ VERABI_NO_DBG=${VER}${THREAD}
unset _PYTHON_SYSCONFIGDATA_NAME
unset _CONDA_PYTHON_SYSCONFIGDATA_NAME

declare -a LTO_CFLAGS=()
if [[ ${_OPTIMIZED} == yes ]]; then
if [[ ${CC} =~ .*gcc.* ]]; then
LTO_CFLAGS+=(-fuse-linker-plugin)
LTO_CFLAGS+=(-ffat-lto-objects)
# -flto must come after -flto-partition due to the replacement code
# TODO :: Replace the replacement code using conda-build's in-build regex replacement.
LTO_CFLAGS+=(-flto-partition=none)
LTO_CFLAGS+=(-flto)
else
# TODO :: Check if -flto=thin gives better results. It is about faster
# compilation rather than faster execution so probably not:
# http://clang.llvm.org/docs/ThinLTO.html
# http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html
LTO_CFLAGS+=(-flto)
fi
fi

make -C ${_buildd_static} install

declare -a _FLAGS_REPLACE=()
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 1 %}
{% set build_number = 2 %}

# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
Expand Down