Skip to content

Commit 4ff8428

Browse files
committed
[build] Use MinSizeRel for CMake when compiling examples
Turns out that avr-g++ crashes when using -O3 instead of -Os.
1 parent 4fdd2a1 commit 4ff8428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/scripts/examples_compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def build(project):
6969
elif ":build:cmake" in project_cfg and not is_running_on_windows:
7070
build_dir = re.search(r'name=".+?:build:build.path">(.*?)</option>', project_cfg)[1]
7171
cmd = "cmake -E make_directory {}/cmake-build-release; ".format(build_dir)
72-
cmd += '(cd {}/cmake-build-release && cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" {}); '.format(build_dir, path.absolute())
72+
cmd += '(cd {}/cmake-build-release && cmake -DCMAKE_BUILD_TYPE=MinSizeRel -G "Unix Makefiles" {}); '.format(build_dir, path.absolute())
7373
cmd += "cmake --build {}/cmake-build-release".format(build_dir)
7474
commands.append( (cmd, "CMake") )
7575

0 commit comments

Comments
 (0)