Pekka Jääskeläinen
2010-Feb-18 23:42 UTC
[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
Chris Lattner wrote:>> Mainly this is about a nuisance to need to ask users of TCE to recompile >> LLVM (which might be even installed from a precompiled binary for their >> distro) to be able to compile TCE. > > I'm dubious that doing that would actually work anyway. Since LLVM doesn't > provide a stable API, being able to reuse a previously installed version of > llvm is not very likely to work.Yes, we as an external project using LLVM as a library are painfully familiar with the unstable API by now :) Anyhow, people might have LLVM (a supported version) installed (compiled with the default compilation flags or installed from a binary package of their distro) for other reasons than compiling TCE. From now on these users need to recompile LLVM from sources with non-default flags to make TCE (or other external projects using both LLVM and RTTI) to be able to link with it. I think this should matter something in comparison to a 5% disk size reduction which can be still achieved with disabling RTTI when compiling LLVM for low disk space devices or during LLVM development that requires frequent recompiles. As far as I understood, enabling RTTI by default does not break any clients, but disabling does. So I guess it's a matter how much value the LLVM project gives to external projects using LLVM as a library. How much is the compile time speedup BTW, has it been measured? -- --Pekka
Cédric Venet
2010-Feb-19 10:34 UTC
[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
From now on these users need to recompile LLVM from sources with non-default> flags to make TCE (or other external projects using both LLVM and RTTI) to > be able to link with it. I think this should matter something in comparison to > a 5% disk size reduction which can be still achieved with disabling RTTI > when compiling LLVM for low disk space devices or during LLVM development > that requires frequent recompiles. >I think Chris means 5% runtime speed, which matters regards,
Chandler Carruth
2010-Feb-19 10:54 UTC
[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
On Thu, Feb 18, 2010 at 3:42 PM, Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi> wrote:> From now on these users need to recompile LLVM from sources with non-default > flags to make TCE (or other external projects using both LLVM and RTTI) to > be able to link with it. I think this should matter something in comparison to > a 5% disk size reduction which can be still achieved with disabling RTTI > when compiling LLVM for low disk space devices or during LLVM development > that requires frequent recompiles.IMO, if you wish to preserve the ability to ever turn off RTTI, you must turn it off by default for the developers' builds so that any code which might depend on RTTI breaks immediately. Otherwise, it seems only a matter of time before dependencies slowly creep back into the code base. This has certainly proven true with GCC warnings. =/ I think Nick has it right: developers should build with the most restrictive settings expected to work, packagers should build with the most forgiving settings they can tolerate.
Pekka Jääskeläinen
2010-Feb-19 10:59 UTC
[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
On 02/19/2010 12:54 PM, Chandler Carruth wrote:> IMO, if you wish to preserve the ability to ever turn off RTTI, you > must turn it off by default for the developers' builds so that any > code which might depend on RTTI breaks immediately. Otherwise, it > seems only a matter of time before dependencies slowly creep back into > the code base. This has certainly proven true with GCC warnings. =/ I > think Nick has it right: developers should build with the most > restrictive settings expected to work, packagers should build with the > most forgiving settings they can tolerate.Yes, I see the point and benefits in having RTTI disabled by default during LLVM development. Releases are a different story. That is, what should the distributed tar balls configure with by default. IMHO end users should get RTTI enabled by default as it is less likely to break stuff for them later. I mean, one doesn't usually think things like this when one installs a piece of software from sources: "Maybe I should disable this default flag because maybe a software I'm going to try in 3 weeks breaks unless I do it". As far as I know, RTTI enabled should not increase execution time in case RTTI features (typeinfo, dynamic_cast) are not used. Please correct me if I'm wrong. -- Pekka
Maybe Matching Threads
- [LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
- [LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
- [LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
- [LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?
- [LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?