From fb418daf3d579b6a3f136da41e1ce4076ecbc92c Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Mon, 26 Nov 2018 10:03:35 -0500 Subject: [PATCH] faster, better C compile flags for SDCC --- doc/notes.txt | 1 + src/worker/workermain.ts | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/notes.txt b/doc/notes.txt index ade71761..a12c401c 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -79,6 +79,7 @@ TODO: - show player controls for each platform, allow touch support - granular control over time scrubbing, show CPU state - error showing replay div before rom starts +- compiler flags for final ROM build WEB WORKER FORMAT diff --git a/src/worker/workermain.ts b/src/worker/workermain.ts index 948495b5..43219bfb 100644 --- a/src/worker/workermain.ts +++ b/src/worker/workermain.ts @@ -1130,16 +1130,25 @@ function compileSDCC(step:BuildStep) { setupStdin(FS, code); setupFS(FS, 'sdcc'); var args = ['--vc', '--std-sdcc99', '-mz80', //'-Wall', - '--c1mode', // '--debug', + '--c1mode', + //'--debug', //'-S', 'main.c', //'--asm=sdasz80', //'--reserve-regs-iy', '--less-pedantic', ///'--fomit-frame-pointer', '--opt-code-speed', - //'--oldralloc', // TODO: does this make it fater? + '--oldralloc', //'--cyclomatic', - //'--nooverlay','--nogcse','--nolabelopt','--noinvariant','--noinduction','--nojtbound','--noloopreverse','--no-peep','--nolospre', + //'--nooverlay', + //'--nogcse', + //'--nolabelopt', + //'--noinvariant', + //'--noinduction', + //'--nojtbound', + //'--noloopreverse', + '--no-peep', + '--nolospre', '-o', outpath]; if (params.extra_compile_args) { args.push.apply(args, params.extra_compile_args);