@@ -59,14 +59,14 @@ ifneq ($(DEBUG),false)
59
59
CARGO_FLAG :=
60
60
OPT_FLAGS += -DDEBUG -DJS_DEBUG -g
61
61
62
- # Define an empty WASM_STRIP macro when making a debug build
62
+ # Define an empty WASM_OPT macro when making a debug build
63
63
WASM_STRIP =
64
64
else
65
65
MODE := release
66
66
CARGO_FLAG := --release
67
67
68
68
# Strip binaries when making a non-debug build.
69
- WASM_STRIP = wasm-opt --strip-debug -o $1 $1
69
+ WASM_OPT = wasm-opt -O3 --strip-debug -o $1 $1
70
70
endif
71
71
72
72
# The path to the wasm-tools executable
@@ -321,7 +321,7 @@ $(OBJ_DIR)/js-compute-runtime.wasm: $(OBJ_DIR)/impl/main.o
321
321
$(OBJ_DIR ) /js-compute-runtime.wasm : $(OBJ_DIR ) /host_interface/component/fastly_world_adapter.o
322
322
$(call cmd_format,WASI_LD,$@ ) PATH=" $( FSM_SRC) /scripts:$$ PATH" \
323
323
$(WASI_CXX ) $(LD_FLAGS ) $(OPENSSL_LIBS ) -o $@ $^
324
- $(call cmd_format,WASM_STRIP ,$@ ) $(call WASM_STRIP ,$@ )
324
+ $(call cmd_format,WASM_OPT ,$@ ) $(call WASM_OPT ,$@ )
325
325
$(call cmd_format,WASM_METADATA,$@ ) $(call WASM_METADATA,$@ )
326
326
327
327
# Compute runtime component build ##############################################
@@ -341,7 +341,7 @@ $(OBJ_DIR)/js-compute-runtime-component.wasm: $(FSM_SRC)/host_interface/componen
341
341
$(OBJ_DIR ) /js-compute-runtime-component.wasm : $(OBJ_DIR ) /host_interface/component/fastly_world.o
342
342
$(call cmd_format,WASI_LD,$@ ) PATH=" $( FSM_SRC) /scripts:$$ PATH" \
343
343
$(WASI_CXX ) $(LD_FLAGS ) $(OPENSSL_LIBS ) -o $@ $^
344
- $(call cmd_format,WASM_STRIP ,$@ ) $(call WASM_STRIP ,$@ )
344
+ $(call cmd_format,WASM_OPT ,$@ ) $(call WASM_OPT ,$@ )
345
345
$(call cmd_format,WASM_METADATA,$@ ) $(call WASM_METADATA,$@ )
346
346
347
347
# Shared builtins build ########################################################
0 commit comments