mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-15 01:25:05 +03:00
Add -f execonly to omit library/rts builds
This reduces the compile/test cycle time in development when there's no effect on the libraries.
This commit is contained in:
parent
e6d1cfdf9b
commit
b4938580b2
11
Setup.hs
11
Setup.hs
@ -57,6 +57,13 @@ usesGMP flags =
|
||||
Just False -> False
|
||||
Nothing -> True
|
||||
|
||||
execOnly :: S.ConfigFlags -> Bool
|
||||
execOnly flags =
|
||||
case lookup (FlagName "execonly") (S.configConfigurationsFlags flags) of
|
||||
Just True -> True
|
||||
Just False -> False
|
||||
Nothing -> True
|
||||
|
||||
isRelease :: S.ConfigFlags -> Bool
|
||||
isRelease flags =
|
||||
case lookup (FlagName "release") (S.configConfigurationsFlags flags) of
|
||||
@ -176,7 +183,7 @@ getVersion args flags = do
|
||||
let buildinfo = (emptyBuildInfo { cppOptions = ["-DVERSION="++hash] }) :: BuildInfo
|
||||
return (Just buildinfo, [])
|
||||
|
||||
idrisBuild _ flags _ local = do
|
||||
idrisBuild _ flags _ local = unless (execOnly (configFlags local)) $ do
|
||||
buildStdLib
|
||||
buildRTS
|
||||
where
|
||||
@ -199,7 +206,7 @@ idrisBuild _ flags _ local = do
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- Copy/Install
|
||||
|
||||
idrisInstall verbosity copy pkg local = do
|
||||
idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $ do
|
||||
installStdLib
|
||||
installRTS
|
||||
where
|
||||
|
@ -658,6 +658,11 @@ Flag CI
|
||||
Default: False
|
||||
manual: True
|
||||
|
||||
Flag execonly
|
||||
Description: Build executables only, skip the libraries and RTS
|
||||
Default: False
|
||||
manual: True
|
||||
|
||||
Library
|
||||
hs-source-dirs: src
|
||||
Exposed-modules:
|
||||
|
Loading…
Reference in New Issue
Block a user