You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Posting from a thread in the Cabal matrix channel:
To be very honest (perhaps controversially), I feel like we should deprecate all of these flags specific to a kind of component (--enable-executable-profiling + --enable-library-profiling + --enable-executable-dynamic + --enable-executable-static + --enable-executable-stripping + --enable-library-stripping, etc...) in favor of flags which are applied to the component being built.
That is, cabal install <exe-target> --enable-stripping will strip an executable, cabal build <lib-target> --enable-stripping will strip the library...
--enable-profiling enables profiling for either the lib or executable target. If the target is all then every component gets profiling.
I think it would be just so much simpler both implementation and usability wise.
I often see users simply apply all variations of the flag to get the behaviour they want because it is otherwise not understood how to profile what they want exactly
The text was updated successfully, but these errors were encountered:
IMHO, I've never liked the build/install flags that affect the configuration. I'd prefer if configuration flags were used by the users at configuration time, and then build would just build.
Otherwise things get rebuilt when one uses or doesn't use the flag, since it changes the config.
In some cases, like profiling, we should be able to say that logically we configure to have profiling flavours available as targets but not necessarily build them, so that the user can then choose to build profiling variants or not without changing their config.
Historically, profiling/non-profiling had to be different configurations rather than parallel configurations.
Again, this stems from Custom Setup.hs, because it installs whole packages with normal, profiling or both. Whereas we'd like to be able to install package A as normal, and again (registered separately) as profiling.
Thus if we need to build a profiling version we don't need to rebuild dependencies with profiling+normal, we just build additional ones with profiling only.
Posting from a thread in the Cabal matrix channel:
To be very honest (perhaps controversially), I feel like we should deprecate all of these flags specific to a kind of component (
--enable-executable-profiling
+--enable-library-profiling
+--enable-executable-dynamic
+--enable-executable-static
+--enable-executable-stripping
+--enable-library-stripping
, etc...) in favor of flags which are applied to the component being built.That is,
cabal install <exe-target> --enable-stripping
will strip an executable,cabal build <lib-target> --enable-stripping
will strip the library...--enable-profiling
enables profiling for either the lib or executable target. If the target isall
then every component gets profiling.I think it would be just so much simpler both implementation and usability wise.
I often see users simply apply all variations of the flag to get the behaviour they want because it is otherwise not understood how to profile what they want exactly
The text was updated successfully, but these errors were encountered: