@@ -20,20 +20,25 @@ compiler.warning_flags.default=
2020compiler.warning_flags.more=-Wall
2121compiler.warning_flags.all=-Wall -Wextra
2222
23+ # This can be overridden in boards.txt
24+ build.extra_flags=
25+ build.flags.optimize=-O2 -g3
26+
27+
2328# Default "compiler.path" is correct, change only if you want to override the initial value
2429compiler.path={runtime.tools.csky.path}/bin/
2530compiler.wrapper.path={runtime.tools.w80x_tool.path}/wrapper
2631compiler.wrapper.path.windows={runtime.tools.w80x_tool.path}/win/busybox" ash "{runtime.tools.w80x_tool.path}/wrapper
2732compiler.c.cmd=csky-elfabiv2-gcc
28- compiler.c.flags=-mhard-float -DGCC_COMPILE=1 -O2 -g3 -Wall -ffunction-sections -fdata-sections -c
33+ compiler.c.flags=-mhard-float -DGCC_COMPILE=1 {build.flags.optimize} -Wall -ffunction-sections -fdata-sections -c
2934
3035compiler.c.elf.flags=-Wl,--gc-sections -Wl,-zmax-page-size=1024 -Wl,--whole-archive
3136compiler.c.elf.cmd=csky-elfabiv2-gcc
3237
3338compiler.S.flags=-mhard-float -Wa,--gdwarf2
3439
3540compiler.cpp.cmd=csky-elfabiv2-g++
36- compiler.cpp.flags=-mhard-float -DGCC_COMPILE=1 -O2 -g3 -Wall -ffunction-sections -fdata-sections -c
41+ compiler.cpp.flags=-mhard-float -DGCC_COMPILE=1 {build.flags.optimize} -Wall -ffunction-sections -fdata-sections -c
3742
3843compiler.ar.cmd=csky-elfabiv2-gcc-ar
3944compiler.ar.flags=ru
@@ -46,8 +51,7 @@ compiler.elf2bin.cmd=csky-elfabiv2-objcopy
4651compiler.ldflags=-lm -Wl,-T{build.core.path}/ld/gcc_csky.ld
4752compiler.size.cmd=csky-elfabiv2-size
4853
49- # This can be overridden in boards.txt
50- build.extra_flags=
54+
5155
5256
5357
0 commit comments