Use -O2 instead of -O3

This commit is contained in:
2026-03-11 18:05:06 +01:00
parent 64a7098112
commit 593f0e34f7
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,8 @@
WASI_ROOT := /opt/wasi-sdk
WAMR := /opt/wamr
OPT := -O3
# -O3 generates more code than -O2 (unrolling/inlining etc.)
OPT := -O2
################################################################
# C -> WASM
@ -52,7 +54,7 @@ ${BUILD_DIR}/%/module_wasm.c: ${BUILD_DIR}/%/module.aot
${XXD} -i $< > $@
################################################################
# WASM loaded by Runtime (FAIL+Baremetal platform)
# AOT loaded by Runtime (FAIL+Baremetal platform)
# NOTE: make build-sum: "error: bp cannot be used in asm here"
# could remove "ebp" from the clobber list (ARCH_ASM_CLOBBER_ALL) or
@ -104,7 +106,7 @@ ${BUILD_DIR}/%/system.elf: ${BUILD_DIR}/%/system.o ${BUILD_DIR}/syscalls.o ${BUI
${CC} ${LDFLAGS} -o $@
################################################################
# WASM loaded by Runtime (Host+Linux platform)
# AOT loaded by Runtime (Host+Linux platform)
CC_LINUX := gcc
CFLAGS_LINUX := \
@ -142,7 +144,7 @@ ${BUILD_DIR}/%/system-linux.elf: ${BUILD_DIR}/%/system-linux.o
${CC_LINUX} ${LDFLAGS_LINUX} -o $@
################################################################
# WASM loaded by Runtime (Host+Baremetal platform)
# AOT loaded by Runtime (Host+Baremetal platform)
CC_BAREMETAL := /opt/crosscompiler/bin/i386-elf-gcc
CFLAGS_BAREMETAL := \