@@ -1600,6 +1600,8 @@ idrisMain opts =
16001600 let cgn = case opt getCodegen opts of
16011601 [] -> Via "c"
16021602 xs -> last xs
1603+ let cgFlags = opt getCodegenArgs opts
1604+
16031605 -- Now set/unset specifically chosen optimisations
16041606 sequence_ (opt getOptimisation opts)
16051607 script <- case opt getExecScript opts of
@@ -1624,6 +1626,7 @@ idrisMain opts =
16241626 setOutputTy outty
16251627 setNoBanner nobanner
16261628 setCodegen cgn
1629+ mapM_ (addFlag cgn) cgFlags
16271630 mapM_ makeOption opts
16281631 -- if we have the --bytecode flag, drop into the bytecode assembler
16291632 case bcs of
@@ -1838,6 +1841,9 @@ getCodegen :: Opt -> Maybe Codegen
18381841getCodegen (UseCodegen x) = Just x
18391842getCodegen _ = Nothing
18401843
1844+getCodegenArgs :: Opt -> Maybe String
1845+getCodegenArgs (CodegenArgs args) = Just args
1846+getCodegenArgs _ = Nothing
18411847
18421848getConsoleWidth :: Opt -> Maybe ConsoleWidth
18431849getConsoleWidth (UseConsoleWidth x) = Just x