Skip to content

Commit 958bf0e

Browse files
committed
disable lto for travis in pybind
1 parent f1d6fc7 commit 958bf0e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/pybind/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ LIBFILE_EXTENSION := $(PYBIND_EXTENSION)
2626

2727
# pybind11 is heavily templated and generates code that is bloated before optimization.
2828
# -flto is link time optimization which apparently is important.
29-
CXXFLAGS += -O3 -flto -I.
30-
LDFLAGS += -flto
29+
ifndef CI_TARGETS
30+
LTOFLAG = -flto
31+
endif
32+
33+
CXXFLAGS += -O3 $(LTOFLAG) -I.
34+
LDFLAGS += $(LTOFLAG)
3135

3236
ifeq ($(shell uname),Darwin)
3337
LDFLAGS += -undefined dynamic_lookup

tools/extras/travis_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CCC=$(mtoken CXX "$CXX")
6868
echo "Building tools..." [Time: $(date)]
6969
runvx cd tools
7070
runvx make -j$MAXPAR openfst "$CCC" CXXFLAGS="$CF" \
71-
OPENFST_CONFIGURE="--disable-static --enable-shared --disable-bin --disable-dependency-tracking"
71+
OPENFST_CONFIGURE="--disable-static --enable-shared --disable-dependency-tracking"
7272
runvx make -j$MAXPAR cub "$CCC" CXXFLAGS="$CF"
7373
cd ..
7474

0 commit comments

Comments
 (0)