Description
The set of flags for building rustc is getting bigger and the configuration for a release build versus something useful for developing is diverging.
We should add two flags to make --release
and --develop
which are umbrella flags of sensible sets of flags. A release build should be make the optimal compiler and develop should balance compile time, debug info, and optimisation.
--develop
should not be no-debug (i.e., include logging), should build jemalloc in debug mode, have all asserts on in llvm, should be an O2 build (I think, cc @epdtry), and should use parallel builds with 4 threads.
--release
should be no-debug (see #17496), should build release versions of jemalloc and llvm, should be O3, and should not use parallel builds.
Setting any individual flags should override these settings.
Open questions: should --develop
include debuginfo by default? (Does this even work at the moment, I know there have been bugs recently. cc @michaelwoerister)
Are there other flags that should be set?
Can we do this as proposed? I assume configure can set different defaults for make. (cc @alexcrichton)
Which should be the default? (Or should the user be forced to specify one or the other). I think @thestinger has made a good argument elsewhere that --release should be the default since it is more unfortunate if a packager makes a mistake than a developer.