mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-26 10:49:17 +00:00
sdcc: use "#pragma opt_code_speed/size" to activate optimization flags
This commit is contained in:
parent
9ddad79326
commit
151ab0353d
@ -1360,7 +1360,6 @@ function compileSDCC(step:BuildStep) {
|
||||
'--less-pedantic',
|
||||
///'--fomit-frame-pointer',
|
||||
//'--opt-code-speed',
|
||||
'--oldralloc',
|
||||
//'--max-allocs-per-node', '1000',
|
||||
//'--cyclomatic',
|
||||
//'--nooverlay',
|
||||
@ -1370,9 +1369,15 @@ function compileSDCC(step:BuildStep) {
|
||||
//'--noinduction',
|
||||
//'--nojtbound',
|
||||
//'--noloopreverse',
|
||||
'--no-peep',
|
||||
'--nolospre',
|
||||
'-o', outpath];
|
||||
// if "#pragma opt_code" found do not disable optimziations
|
||||
if (!/^\s*#pragma\s+opt_code/m.exec(code)) {
|
||||
args.push.apply(args, [
|
||||
'--oldralloc',
|
||||
'--no-peep',
|
||||
'--nolospre'
|
||||
]);
|
||||
}
|
||||
if (params.extra_compile_args) {
|
||||
args.push.apply(args, params.extra_compile_args);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user