diff options
author | Brad Richardson <brichardson@structint.com> | 2020-03-31 15:27:30 -0500 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-03-31 15:27:30 -0500 |
commit | 623a9d5a2f4decf0bb71f8d44d21148b141f6204 (patch) | |
tree | ec44248ed14e23d375ff64161ca0234c56dd050d /app | |
parent | 43b28f9559cb4cb3affb1bee7063bf27399c7b31 (diff) | |
download | fpm-623a9d5a2f4decf0bb71f8d44d21148b141f6204.tar.gz fpm-623a9d5a2f4decf0bb71f8d44d21148b141f6204.zip |
Remove compiler flags from toml
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/app/Main.hs b/app/Main.hs index 8d07c40..e9b0737 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -36,13 +36,12 @@ newtype Arguments = Arguments { command' :: Command } data TomlSettings = TomlSettings { tomlSettingsCompiler :: !Text , tomlSettingsProjectName :: !Text - , tomlSettingsDebugOptions :: ![Text] , tomlSettingsLibrary :: !(Maybe Library) } data AppSettings = AppSettings { appSettingsCompiler :: !Text , appSettingsProjectName :: !Text - , appSettingsDebugOptions :: ![Text] + , appSettingsFlags :: ![Text] , appSettingsLibrary :: !(Maybe Library) } data Library = Library { librarySourceDir :: !Text } @@ -71,7 +70,7 @@ build settings = do putStrLn "Building" let compiler = unpack $ appSettingsCompiler settings let projectName = unpack $ appSettingsProjectName settings - let flags = map unpack $ appSettingsDebugOptions settings + let flags = map unpack $ appSettingsFlags settings case appSettingsLibrary settings of Just librarySettings -> do let librarySourceDir' = unpack $ librarySourceDir librarySettings @@ -138,8 +137,6 @@ settingsCodec = .= tomlSettingsCompiler <*> Toml.text "name" .= tomlSettingsProjectName - <*> Toml.arrayOf Toml._Text "debug-options" - .= tomlSettingsDebugOptions <*> Toml.dioptional (Toml.table libraryCodec "library") .= tomlSettingsLibrary @@ -150,10 +147,20 @@ toml2AppSettings :: TomlSettings -> IO AppSettings toml2AppSettings tomlSettings = do librarySettings <- getLibrarySettings $ tomlSettingsLibrary tomlSettings return AppSettings - { appSettingsCompiler = tomlSettingsCompiler tomlSettings - , appSettingsProjectName = tomlSettingsProjectName tomlSettings - , appSettingsDebugOptions = tomlSettingsDebugOptions tomlSettings - , appSettingsLibrary = librarySettings + { appSettingsCompiler = tomlSettingsCompiler tomlSettings + , appSettingsProjectName = tomlSettingsProjectName tomlSettings + , appSettingsFlags = [ "-Wall" + , "-Wextra" + , "-Wimplicit-interface" + , "-Werror" + , "-fPIC" + , "-fmax-errors=1" + , "-g" + , "-fbounds-check" + , "-fcheck-array-temporaries" + , "-fbacktrace" + ] + , appSettingsLibrary = librarySettings } getLibrarySettings :: Maybe Library -> IO (Maybe Library) |