Skip to content

Commit 0277e57

Browse files
committed
Replace "hard-coded" optimisation level "-Os" with the build property "compiler.optimization_flags".
1 parent 031f36e commit 0277e57

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

platform.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ compiler.warning_flags.default=
1414
compiler.warning_flags.more=-Wall
1515
compiler.warning_flags.all=-Wall -Wextra
1616

17+
compiler.optimization_flags=-Os
18+
1719
compiler.path={build.compiler_path}
1820
compiler.c.cmd={build.crossprefix}gcc
19-
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -nostdlib {build.defines} -MMD -std=gnu11 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
21+
compiler.c.flags=-c {compiler.warning_flags} {compiler.optimization_flags} -g3 -nostdlib {build.defines} -MMD -std=gnu11 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
2022
compiler.c.elf.cmd={build.crossprefix}g++
2123
compiler.c.elf.flags=-Wl,--gc-sections --specs=nosys.specs {compiler.warning_flags} -mcpu={build.mcu} {build.float-abi} {build.fpu}
2224
compiler.S.cmd={build.crossprefix}g++
23-
compiler.S.flags=-c -g -x assembler-with-cpp -Os -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections
25+
compiler.S.flags=-c -g -x assembler-with-cpp {compiler.optimization_flags} -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections
2426
compiler.cpp.cmd={build.crossprefix}g++
25-
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -MMD -nostdlib {build.defines} -MMD -std=gnu++17 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
27+
compiler.cpp.flags=-c {compiler.warning_flags} {compiler.optimization_flags} -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -MMD -nostdlib {build.defines} -MMD -std=gnu++17 -mcpu={build.mcu} {build.float-abi} {build.fpu} -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin
2628
compiler.ar.cmd={build.crossprefix}ar
2729
compiler.ar.flags=rcs
2830
compiler.ar.extra_flags=

0 commit comments

Comments
 (0)