Turn on ARM linker --inline

For release and develop profiles, turn on the linker's `--inline`
optimisation. This can save a couple of hundred bytes in a typical
image.

The optimisation replaces branches to small functions with the
inlined code from those functions. And it's possible that the
out-of-line functions can be eliminated.

Setting confined to release and develop builds only, as it can lead to
invalid debug information.
pull/12825/head
Kevin Bracey 2020-04-16 17:49:43 +03:00
parent ee476d9954
commit 4caab1cce5
2 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@
"asm": [],
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
"cxx": ["-fno-rtti", "-fno-c++-static-destructors", "-std=gnu++14"],
"ld": ["--show_full_path", "--legacyalign", "--any_contingency",
"ld": ["--show_full_path", "--legacyalign", "--inline", "--any_contingency",
"--keep=os_cb_sections"]
},
"ARM": {
@ -34,7 +34,7 @@
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
"ld": ["--show_full_path", "--any_contingency", "--keep=os_cb_sections"]
"ld": ["--show_full_path", "--any_contingency", "--inline", "--keep=os_cb_sections"]
},
"uARM": {
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
@ -45,7 +45,7 @@
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
"ld": ["--library_type=microlib"]
"ld": ["--inline", "--library_type=microlib"]
},
"IAR": {
"common": [

View File

@ -24,7 +24,7 @@
"asm": [],
"c": ["-D__ASSERT_MSG", "-std=gnu11"],
"cxx": ["-fno-rtti", "-fno-c++-static-destructors", "-std=gnu++14"],
"ld": ["--show_full_path", "--legacyalign", "--any_contingency",
"ld": ["--show_full_path", "--legacyalign", "--inline", "--any_contingency",
"--keep=os_cb_sections"]
},
"ARM": {
@ -34,7 +34,7 @@
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
"ld": ["--show_full_path", "--any_contingency", "--keep=os_cb_sections"]
"ld": ["--show_full_path", "--any_contingency", "--inline", "--keep=os_cb_sections"]
},
"uARM": {
"common": ["-c", "--gnu", "-Ospace", "--split_sections",
@ -44,7 +44,7 @@
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp11", "--no_rtti", "--no_vla"],
"ld": ["--library_type=microlib"]
"ld": ["--inline", "--library_type=microlib"]
},
"IAR": {
"common": [