Commit bd7daad8 authored by Lazlo Domoszlai's avatar Lazlo Domoszlai

new flag to disable rts flag checking in the target binary

parent 1f7e8b42
......@@ -235,6 +235,11 @@ where
, toMark ao.marking_collection
, noPS (\l->{l & ao = {l.ao & marking_collection = not l.ao.marking_collection}})
)
, ( "Disable RTS command line arguments"
, Nothing
, toMark ao.disable_rts_flags
, noPS (\l->{l & ao = {l.ao & disable_rts_flags = not l.ao.disable_rts_flags}})
)
]
(Columns 1)
[ ControlPos (Left,zero)
......
......@@ -4,11 +4,11 @@ import StdArray,StdChar,StdFile, StdInt
import PmTypes
ApplicationOptionsToFlags :: !ApplicationOptions -> Int
ApplicationOptionsToFlags {sgc,pss,marking_collection,set,o,memoryProfiling,write_stderr_to_file}
ApplicationOptionsToFlags {sgc,pss,marking_collection,set,o,memoryProfiling,write_stderr_to_file,disable_rts_flags}
= flags
where
flags
= showgc+printstacksize+showexectime+cons+marking_collection_mask+memory_profiling_mask+write_stderr_to_file_mask
= showgc+printstacksize+showexectime+cons+marking_collection_mask+memory_profiling_mask+write_stderr_to_file_mask+disable_rts_flags_mask
showgc
| sgc = 2
= 0
......@@ -34,6 +34,10 @@ where
NoReturnType -> 16
NoConsole -> 16
disable_rts_flags_mask
| disable_rts_flags = 8192
= 0
FlagsToApplicationOptions :: !Int !ApplicationOptions -> ApplicationOptions;
FlagsToApplicationOptions flags applicationOptions
= {applicationOptions & sgc=showgc,pss=printstacksize,marking_collection=marking_collection,set=showexectime,
......
......@@ -272,6 +272,7 @@ ApplicationOptionsTable =
SimpleOption "ShowGC" (\a->a.sgc) (\v a->{a & sgc=v}),
SimpleOption "ShowStackSize" (\a->a.pss) (\v a->{a & pss=v}),
SimpleOption "MarkingCollector" (\a->a.marking_collection) (\v a->{a & marking_collection=v}),
SimpleOption "DisableRTSFlags" (\a->a.disable_rts_flags) (\v a->{a & disable_rts_flags=v}),
SimpleOption "StandardRuntimeEnv" (\a->a.standard_rte) (\v a->{a & standard_rte=v}),
GroupedOption "Profile" ApplicationProfiletOptionsTable id const,
GroupedOption "Output" ApplicationOutputOptionsTable id const
......
......@@ -116,6 +116,7 @@ DefCodeGenOptions :: CodeGenOptions
, sgc :: !Bool // show garbage collections
, pss :: !Bool // print stack size
, marking_collection :: !Bool // use marking garbage collector
, disable_rts_flags :: !Bool // disable checking command line arguments for RTS flags
, o :: !Output // console type
, fn :: !String // font name: only on Mac platform
......
......@@ -307,6 +307,7 @@ DefCodeGenOptions =
, sgc :: !Bool
, pss :: !Bool
, marking_collection :: !Bool
, disable_rts_flags :: !Bool
, o :: !Output
, fn :: !String // !FontName
, fs :: !Int // !FontSize
......@@ -329,6 +330,7 @@ DefApplicationOptions =
, sgc = False
, pss = False
, marking_collection = False
, disable_rts_flags = False
, o = ShowConstructors
, fn = "Monaco" //=> platform dependant?
, fs = 9 //=> platform dependant?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment