diff options
author | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-03-13 11:17:56 +0000 |
---|---|---|
committer | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-03-13 11:17:56 +0000 |
commit | 2306d2fba922f356622bdbf3769ba502ede43a10 (patch) | |
tree | e2c312117da3301f855cbc6a0fa41035c88fc533 /compiler/switches.pas | |
parent | c637d77976ff476d100e30bbd879423b0757b09d (diff) | |
download | fpc-2306d2fba922f356622bdbf3769ba502ede43a10.tar.gz |
* list supported optimization options in -i
* support $OPTIMIZATION and $O+
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@2904 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/switches.pas')
-rw-r--r-- | compiler/switches.pas | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/switches.pas b/compiler/switches.pas index 9f7549c7af..63435c40e3 100644 --- a/compiler/switches.pas +++ b/compiler/switches.pas @@ -31,7 +31,7 @@ function CheckSwitch(switch,state:char):boolean; implementation uses - globtype,systems, + globtype,systems,cpuinfo, globals,verbose,fmodule; {**************************************************************************** @@ -39,7 +39,7 @@ uses ****************************************************************************} type - TSwitchType=(ignoredsw,localsw,modulesw,globalsw,illegalsw,unsupportedsw,alignsw); + TSwitchType=(ignoredsw,localsw,modulesw,globalsw,illegalsw,unsupportedsw,alignsw,optimizersw); SwitchRec=record typesw : TSwitchType; setsw : byte; @@ -62,7 +62,7 @@ const {L} (typesw:modulesw; setsw:ord(cs_local_browser)), {M} (typesw:localsw; setsw:ord(cs_generate_rtti)), {N} (typesw:unsupportedsw; setsw:ord(cs_localnone)), - {O} (typesw:unsupportedsw; setsw:ord(cs_localnone)), + {O} (typesw:optimizersw; setsw:ord(cs_opt_none)), {P} (typesw:modulesw; setsw:ord(cs_openstring)), {Q} (typesw:localsw; setsw:ord(cs_check_overflow)), {R} (typesw:localsw; setsw:ord(cs_check_range)), @@ -92,7 +92,7 @@ const {L} (typesw:modulesw; setsw:ord(cs_local_browser)), {M} (typesw:localsw; setsw:ord(cs_generate_rtti)), {N} (typesw:unsupportedsw; setsw:ord(cs_localnone)), - {O} (typesw:unsupportedsw; setsw:ord(cs_localnone)), + {O} (typesw:optimizersw; setsw:ord(cs_opt_none)), {P} (typesw:modulesw; setsw:ord(cs_openstring)), {Q} (typesw:localsw; setsw:ord(cs_check_overflow)), {R} (typesw:localsw; setsw:ord(cs_check_range)), @@ -135,6 +135,13 @@ begin aktpackrecords:=4 else aktpackrecords:=1; + optimizersw : + begin + if state='+' then + aktoptimizerswitches:=level2optimizerswitches + else + aktoptimizerswitches:=[]; + end; ignoredsw : Message1(scan_n_ignored_switch,'$'+switch); illegalsw : |