1
1
mirror of https://github.com/anoma/juvix.git synced 2024-09-11 08:15:41 +03:00

--debug implies -O0 as the default (#2728)

- Fixes #2726
This commit is contained in:
Jan Mas Rovira 2024-04-16 13:52:23 +02:00 committed by GitHub
parent 138e8f4aca
commit 698560076f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,9 +25,14 @@ applyCompileCommonOptions :: CompileCommonOptions' b -> EntryPoint -> EntryPoint
applyCompileCommonOptions opts e =
e
{ _entryPointDebug = opts ^. compileDebug,
_entryPointOptimizationLevel = fromMaybe defaultOptimizationLevel (opts ^. compileOptimizationLevel),
_entryPointOptimizationLevel = fromMaybe defaultOptimization (opts ^. compileOptimizationLevel),
_entryPointInliningDepth = opts ^. compileInliningDepth
}
where
defaultOptimization :: Int
defaultOptimization
| opts ^. compileDebug = 0
| otherwise = defaultOptimizationLevel
fromCompileCommonOptionsMain :: (Members '[App] r) => CompileCommonOptionsMain -> Sem r CompileCommonOptions
fromCompileCommonOptionsMain = traverseOf compileInputFile getMainAppFile