Skip to content

Commit bdfc02b

Browse files
committed
Test reviewer's method of moving delcaration of lua_module_optimization to the lua makefile
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
1 parent d2db0c2 commit bdfc02b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ $(RDMA_MODULE_NAME): $(SERVER_NAME)
736736

737737
# engine_lua.so
738738
$(LUA_MODULE_NAME): .make-prerequisites
739-
$(MAKE) -C modules/lua OPTIMIZATION="$(OPTIMIZATION)" BUILD_LUA="$(BUILD_LUA)"
739+
$(MAKE) -C modules/lua OPTIMIZATION="$(LUA_MODULE_OPTIMIZATION)" BUILD_LUA="$(BUILD_LUA)"
740740

741741
# valkey-cli
742742
$(ENGINE_CLI_NAME): $(ENGINE_CLI_OBJ)

src/modules/lua/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ 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.
13+
LUA_MODULE_OPTIMIZATION=$(subst -flto,,$(subst -ffat-lto-objects,,$(subst -flto=auto,,$(OPTIMIZATION))))
1214
endif
1315

1416
ifeq ($(uname_S),Darwin)

0 commit comments

Comments
 (0)