Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign
XML based compilers
MortenMacFly:
--- Quote from: thomas on June 22, 2012, 10:18:35 am ---Sqrat test attached, no external dependencies. Unzip, doubleclick, hit "build".
--- End quote ---
Same crash here, it seems the VM pointer is zero, therefore compilation fails and throws (in sq_compile)...
MortenMacFly:
--- Quote from: MortenMacFly on June 22, 2012, 11:03:56 am ---
--- Quote from: thomas on June 22, 2012, 10:18:35 am ---Sqrat test attached, no external dependencies. Unzip, doubleclick, hit "build".
--- End quote ---
Same crash here, it seems the VM pointer is zero, therefore compilation fails and throws (in sq_compile)...
--- End quote ---
Harhar, funny. Solved it. All you need to do is to set the default VM before you do the table stuff (all what's in your "try..." statements. So just add this line after "sq_seterrorhandler(vm);":
--- Code: ---Sqrat::DefaultVM::Set(vm);
--- End code ---
Then it works just fine. 8) (Its written in the docs, too btw... ;D)
thomas:
Wow, what a stupid mistake (the actual mistake was forgetting to pass the VM parameter to the script constructor, though). Hmm good job you can actually make that mistake and it doesn't warn you... but at leat it crashes hard and crashes early, so I guess that's fair enough.
Setting the default VM fixes the issue too, of course, and then you need not pass the VM to the table's constructor or the root-table getter, either. Maybe that's even better, we probably don't want more than one VM in Code::Blocks anyway, do we.
So it works... guess then it should be no biggie to get this running. If I'm not too tired on saturday afternoon, I might just give it a try.
Alpha:
--- Quote from: MortenMacFly on June 22, 2012, 07:56:49 am ---2.) I think later on we can/should transfer the regexes and advanced compiler options to the XML file, too. For this, it needs an interface to the configmanager.
--- End quote ---
What are these other advanced compiler options? I think the XML files currently contain all options except for the regexes.
The options_*.xml files currently only contain settings that could be losslessly transferred from C++. Looking at the various settings each compiler contains, it appears that regexes are the only remaining items that fit this requirement; the next patch will support these in the options files.
The other main component of a compiler is auto-detect. I will be creating some (limited) functionality of this in compiler_*.xml files (files I am working on for dynamically detected pure XML compilers).
--- Quote from: MortenMacFly on June 22, 2012, 08:14:30 am ---...I just saw: Did you realise SVN revision 8060? Is this already integrated?
--- End quote ---
Yes (and it was very fast to do; adding this new flag to options_common_warnings.xml put it in the whole GNU family).
About message boxes/error handling, what I have written so far mostly makes the (incorrect) assumption that it will only be fed properly formed files. Eventually something more robust will need to be added...
--- Quote from: Alpha on June 22, 2012, 07:51:38 am ---
* Warning messages if multiple compiler options are unwise to use together (but still legal)
* Automatic disabling of conflicting compiler options (for example, enabling debug symbols automatically disables strip)
--- End quote ---
(I am no compiler expert, so I only added these interactions where they were obvious. Feel free to let me know of any flag interactions I have missed/messed up.)
Question: The only condition that <if></if> blocks currently recognize is platform - are there any other conditions that would be made use of during the loading of a compiler?
MortenMacFly:
--- Quote from: Alpha on June 22, 2012, 04:44:46 pm ---What are these other advanced compiler options?
--- End quote ---
They are for example in default.conf:
<compiler> -> <sets> -> <{compiler's name}> -> <macros>
...and contain everything you setup in the compiler options page under -> Settings -> Compiler -> tab "Other settings" -> Advanced options -> {tabs "Commands", "Output parsing", "Others"}.
Note that this is usually empty, if not changed. You can apply what's written here:
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
...to see any content there.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version