add --enable-optimizations configure flag to architectures using lld where

llvm-profdata is also available to enable PGO builds

ok sthen@
This commit is contained in:
robert 2022-07-27 06:20:10 +00:00
parent b90f879e68
commit 1b98a91114
7 changed files with 32 additions and 6 deletions

View File

@ -8,6 +8,6 @@ SHARED_LIBS = python3.10 0.0
VERSION_SPEC = >=3.10,<3.11
PORTROACH = limit:^3\.10
REVISION-main = 1
REVISION = 2
.include <bsd.port.mk>

View File

@ -35,6 +35,15 @@ Index: configure.ac
AC_SUBST(LLVM_AR_FOUND)
if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
then
@@ -1473,7 +1474,7 @@ then
fi
LLVM_PROF_ERR=no
case $CC in
- *clang*)
+ *clang*|cc)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
@@ -2905,18 +2906,7 @@ AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/S
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX

View File

@ -8,6 +8,6 @@ SHARED_LIBS = python3.8 0.0
VERSION_SPEC = >=3.8,<3.9
PORTROACH = limit:^3\.8
REVISION = 2
REVISION = 3
.include <bsd.port.mk>

View File

@ -47,6 +47,15 @@ Index: configure.ac
AC_SUBST(LLVM_AR_FOUND)
if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
then
@@ -1447,7 +1447,7 @@ then
fi
LLVM_PROF_ERR=no
case $CC in
- *clang*)
+ *clang*|cc)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
@@ -2813,18 +2813,7 @@ AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/S
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX

View File

@ -8,13 +8,12 @@ SHARED_LIBS = python3.9 0.0
VERSION_SPEC = >=3.9,<3.10
PORTROACH = limit:^3\.9
REVISION-main = 0
REVISION-tkinter = 0
REVISION = 1
# This is the MODPY_DEFAULT_VERSION_3 version of Python:
# - override "@comment" setting so that bin/python3 etc are installed
PY_DEFAULTONLY =
# - disable bundled pip in favour of the version from devel/py-pip
CONFIGURE_ARGS += --with-ensurepip=no
CONFIGURE_ARGS += --with-ensurepip=no --enable-optimizations
.include <bsd.port.mk>

View File

@ -46,6 +46,15 @@ Index: configure.ac
AC_SUBST(LLVM_AR_FOUND)
if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
then
@@ -1476,7 +1477,7 @@ then
fi
LLVM_PROF_ERR=no
case $CC in
- *clang*)
+ *clang*|cc)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
@@ -2865,18 +2866,7 @@ AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/S
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX

View File

@ -122,7 +122,7 @@ CONFIGURE_ARGS += --with-fpectl \
.if ${VERSION} != "2.7"
CONFIGURE_ARGS += --enable-loadable-sqlite-extensions
. if ${PROPERTIES:Mlld}
CONFIGURE_ARGS += --with-lto
CONFIGURE_ARGS += --with-lto --enable-optimizations
. endif
TEST_IS_INTERACTIVE = Yes
.endif