Skip to content

Commit 6dd0312

Browse files
Update build_base.sh
1 parent 9e16b86 commit 6dd0312

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

recipe/build_base.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then
9797
CPPFLAGS="-isysroot ${CONDA_BUILD_SYSROOT} "${CPPFLAGS}
9898
fi
9999

100+
if [[ "$target_platform" == linux-* ]]; then
101+
# For https://docs.python.org/3/howto/perf_profiling.html#how-to-obtain-the-best-results
102+
CFLAGS+=" -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
103+
fi
104+
100105
# Debian uses -O3 then resets it at the end to -O2 in _sysconfigdata.py
101106
if [[ ${_OPTIMIZED} = yes ]]; then
102107
CPPFLAGS=$(echo "${CPPFLAGS}" | sed "s/-O2/-O3/g")
103108
CFLAGS=$(echo "${CFLAGS}" | sed "s/-O2/-O3/g")
104109
CXXFLAGS=$(echo "${CXXFLAGS}" | sed "s/-O2/-O3/g")
105-
if [[ "$target_platform" == linux-* ]]; then
106-
# For https://docs.python.org/3/howto/perf_profiling.html#how-to-obtain-the-best-results
107-
CFLAGS+=" -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
108-
fi
109110
fi
110111

111112
if [[ ${PY_INTERP_DEBUG} == yes ]]; then

0 commit comments

Comments
 (0)