Skip to content

Commit b60b5a3

Browse files
authored
Merge pull request #181 from hanxizh9910/fix-clang-lto-linker-mismatch
Fix clang lto linker mismatch
2 parents d2db0c2 + 3358bb6 commit b60b5a3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/modules/lua/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ ifeq ($(BUILD_LUA),module)
99
else
1010
STATIC_LUA_FLAG=-DSTATIC_LUA=1
1111
LUA_TARGET=libvalkeylua.a
12+
# Strip LTO flags for the static build. When archiving into a .a,
13+
# LTO bitcode objects cause linker failures if the system linker
14+
# cannot read them.
15+
OPTIMIZATION:=$(subst -flto,,$(subst -ffat-lto-objects,,$(subst -flto=auto,,$(OPTIMIZATION))))
1216
endif
1317

1418
ifeq ($(uname_S),Darwin)

0 commit comments

Comments
 (0)