Skip to content

Commit 0afc44d

Browse files
Veijo PesonenSeppo Takalo
Veijo Pesonen
authored and
Seppo Takalo
committed
Enables GCC's Link-Time Optimization with tiny profile
1 parent 885622a commit 0afc44d

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def bootloaderBuildStep(stepName,
8888
// build with default setup
8989
sh ("""
9090
mbed --version
91-
mbed compile -m ${target} -t ${toolchain} --app-config ${mbed_app_json} --build ${build_dir} --profile release
91+
mbed compile -m ${target} -t ${toolchain} --app-config ${mbed_app_json} --build ${build_dir} --profile tiny.json
9292
""")
9393

9494
// Archive the binary

tiny.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"GCC_ARM": {
3+
"common": ["-Wall", "-Wextra",
4+
"-Wno-unused-parameter", "-Wno-missing-field-initializers",
5+
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
6+
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
7+
"-MMD", "-fno-delete-null-pointer-checks",
8+
"-fomit-frame-pointer", "-Os", "-flto", "-DNDEBUG", "-g"],
9+
"asm": ["-c", "-x", "assembler-with-cpp"],
10+
"c": ["-c", "-std=gnu11"],
11+
"cxx": ["-c", "-std=gnu++14", "-fno-rtti", "-Wvla"],
12+
"ld": ["-Wall", "-Wextra",
13+
"-Wno-unused-parameter", "-Wno-missing-field-initializers",
14+
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
15+
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
16+
"-MMD", "-fno-delete-null-pointer-checks",
17+
"-fomit-frame-pointer", "-Os", "-flto", "-DNDEBUG", "-g",
18+
"-Wl,--gc-sections", "-Wl,--wrap,main", "-Wl,--wrap,_malloc_r",
19+
"-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r",
20+
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit",
21+
"-u main"]
22+
},
23+
"ARM": {
24+
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
25+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
26+
"--multibyte_chars", "-O3", "-DNDEBUG"],
27+
"asm": [],
28+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
29+
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
30+
"ld": []
31+
},
32+
"uARM": {
33+
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
34+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
35+
"--multibyte_chars", "-O3", "-D__MICROLIB",
36+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DNDEBUG"],
37+
"asm": [],
38+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
39+
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
40+
"ld": ["--library_type=microlib"]
41+
},
42+
"IAR": {
43+
"common": [
44+
"--no_wrap_diagnostics", "-e",
45+
"--diag_suppress=Pa050,Pa084,Pa093,Pa082,Pe540", "-Ohz", "-DNDEBUG", "--enable_restrict"],
46+
"asm": [],
47+
"c": ["--vla", "--diag_suppress=Pe546"],
48+
"cxx": ["--guard_calls", "--no_static_destruction"],
49+
"ld": ["--skip_dynamic_initialization", "--threaded_lib"]
50+
},
51+
"ARMC6": {
52+
"common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz",
53+
"-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions",
54+
"-Wno-reserved-user-defined-literal", "-Wno-deprecated-register",
55+
"-DMULADDC_CANNOT_USE_R7", "-fdata-sections",
56+
"-fno-exceptions", "-MMD", "-D_LIBCPP_EXTERN_TEMPLATE(...)=",
57+
"-fshort-enums", "-fshort-wchar", "-DNDEBUG"],
58+
"asm": [],
59+
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
60+
"cxx": ["-fno-rtti", "-std=gnu++14"],
61+
"ld": ["--show_full_path"]
62+
}
63+
}

0 commit comments

Comments
 (0)