Skip to content

Commit 7664381

Browse files
committed
Reverts the clang-17 pin, strip LTO flags from static Lua module build
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
1 parent d2db0c2 commit 7664381

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,14 @@ $(TLS_MODULE_NAME): $(SERVER_NAME)
734734
$(RDMA_MODULE_NAME): $(SERVER_NAME)
735735
$(QUIET_CC)$(CC) $(LDFLAGS) -o $@ rdma.c -shared -fPIC $(RDMA_MODULE_CFLAGS)
736736

737+
# Strip LTO flags from OPTIMIZATION for the static Lua module build.
738+
# When archiving into a .a, LTO bitcode objects cause linker failures
739+
# if the system's LLVM gold plugin version doesn't match clang's version.
740+
LUA_MODULE_OPTIMIZATION=$(subst -flto,,$(subst -ffat-lto-objects,,$(subst -flto=auto,,$(OPTIMIZATION))))
741+
737742
# engine_lua.so
738743
$(LUA_MODULE_NAME): .make-prerequisites
739-
$(MAKE) -C modules/lua OPTIMIZATION="$(OPTIMIZATION)" BUILD_LUA="$(BUILD_LUA)"
744+
$(MAKE) -C modules/lua OPTIMIZATION="$(LUA_MODULE_OPTIMIZATION)" BUILD_LUA="$(BUILD_LUA)"
740745

741746
# valkey-cli
742747
$(ENGINE_CLI_NAME): $(ENGINE_CLI_OBJ)

0 commit comments

Comments
 (0)