Skip to content

Commit bdfc13a

Browse files
committed
py311: Force compiler LTO optimizations with exceptions
- NOT when testing all wheels - NOT when including debug_info symbols - NOT when using PPC arch (fails on qoriq)
1 parent 186545d commit bdfc13a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

spk/python311/Makefile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ WHEELS = src/requirements-pure.txt
3131
# Force testing all wheel builds
3232
WHEELS_TEST_ALL = 0
3333

34-
# Force compiler LTO optimizations
35-
ifeq ($(strip $(WHEELS_TEST_ALL)),0)
36-
ENV += PYTHON_OPTIMIZE=1
37-
endif
38-
3934
SERVICE_SETUP = src/service-setup.sh
4035

4136
PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR)
@@ -108,6 +103,18 @@ ifeq ($(findstring $(ARCH),qoriq $(x64_ARCHS)),$(ARCH))
108103
GCC_DEBUG_INFO := 1
109104
endif
110105

106+
# Force compiler LTO optimizations except:
107+
# - when testing all wheels
108+
# - when including debug_info symbols
109+
# - when using PPC arch (fails on qoriq)
110+
ifneq ($(strip $(WHEELS_TEST_ALL)),1)
111+
ifneq ($(strip $(GCC_DEBUG_INFO)),1)
112+
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
113+
ENV += PYTHON_OPTIMIZE=1
114+
endif
115+
endif
116+
endif
117+
111118
## WHEELS_TEST_ALL: Force testing all wheel building
112119
ifeq ($(strip $(WHEELS_TEST_ALL)),1)
113120

0 commit comments

Comments
 (0)