More abstraction of common compiler options.
This issue was originally created at: 2008-03-30 17:22:19.
This issue was reported by: simpleton.
simpleton said at 2008-03-30 17:22:19
It is needed to have more abstraction of compiler options. Currently, one abstraction is the CPPDEFINES variable, which will automatically be processed correctly. I compiled a C++ program, with mingw got no problems, but with visual c++ it compiled but with warning about exception semantics not being enabled.
g++ test.cpp-> no warningscl test.cpp-> warning about needing to use /EHsc
Common features that need somehow to be abstracted:
- Debugging: place debug information in intermediate/final files
- Debugging: compile in debug 'mode' (compiler specific DEBUG preprocessor variable set), different from above in that even in release mode, debug information can still be in output file.
- Optimizations: speed, size, strict aliasing/etc issues, inline issues
- Warnings: show warnings or not
- C++, enable exception handling support
- c++, enable RTTI
- Runtime library: static/dynamic, single/multi-threaded, debug/release
Various compilers may have different ways of enabling (or disabling) the above settings. Currently one must still do some manual detection and set the flags accordingly. If the above settings could somehow be abstracted, it would reduce code in the SConstruct file and also allow for future support of more tools without much change to a SConstruct file.
env = Environment()
env.EnableRTTI()
env.EnableException()
...
stevenknight said at 2008-05-22 09:42:22
Target milestone per bug party triage.
stevenknight said at 2009-11-10 18:00:19
stevenknight => issues@scons
simpleton said at 2009-12-12 20:12:38
Created an attachment (id=660) Current work on subst builder
Votes for this issue: 1.
simpleton attached subst.py at 2009-12-12 20:12:38.
Current work on subst builder