Skip to content

Commit

Permalink
py311: Force compiler LTO optimizations with exceptions
Browse files Browse the repository at this point in the history
  - NOT when testing all wheels
  - NOT when including debug_info symbols
  - NOT when using PPC arch (fails on qoriq)
  • Loading branch information
th0ma7 committed Sep 14, 2023
1 parent 213bcff commit 857fb3d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions spk/python311/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ WHEELS = src/requirements-pure.txt
# Force testing all wheel builds
WHEELS_TEST_ALL = 0

# Force compiler LTO optimizations
ifeq ($(strip $(WHEELS_TEST_ALL)),0)
ENV += PYTHON_OPTIMIZE=1
endif

SERVICE_SETUP = src/service-setup.sh

PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR)
Expand Down Expand Up @@ -108,6 +103,18 @@ ifeq ($(findstring $(ARCH),qoriq $(x64_ARCHS)),$(ARCH))
GCC_DEBUG_INFO := 1
endif

# Force compiler LTO optimizations except:
# - when testing all wheels
# - when including debug_info symbols
# - when using PPC arch (fails on qoriq)
ifneq ($(strip $(WHEELS_TEST_ALL)),1)
ifneq ($(strip $(GCC_DEBUG_INFO)),1)
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
ENV += PYTHON_OPTIMIZE=1
endif
endif
endif

## WHEELS_TEST_ALL: Force testing all wheel building
ifeq ($(strip $(WHEELS_TEST_ALL)),1)

Expand Down

0 comments on commit 857fb3d

Please sign in to comment.