Of course, to further complicate matters, different versions of different compilers support different exception handling. In a 64-bit world, you may still use SJLJ but compilers all commonly support SEH (structured exception handling). As an example, if you are building code for Rust, you will probably need a modern gcc from msys2 with DW2 support as that's what the panic/exception formatter in Rust depends on. Certain languages and runtimes have specific requirements as to the exception format supported.
DW2 involves more extensive metadata but produces code that cannot unwind MSVC generated stack-frames - hence you need to ensure that you don't have any code that throws across a "system call". SJLJ produces code that can happily throw exceptions across stack frames of code compiled by MSVC. In the 32-bit world, you have SJLJ (set-jump/long-jump) based exception handling and DWARF-2 (shortened to DW2) based exception handling. C/C++ compilers on windows use various different exception formats and you need to pick the right one for your task. Use the mingw_tdm_gcc resource to fetch a version of the TDM GCC compiler.īy default, you should prefer the msys2 packages as they are newer and better supported. Use the mingw_get resource in any recipe to fetch mingw packages. Use the msys2_package resource in any recipe to fetch msys2 based packages. Requirements PlatformsĪdd this cookbook as a dependency to your cookbook in its metadata.rb and include the default recipe in one of your recipes.
This is required for compiling C software from source. Installs a mingw/msys based compiler tools chain on windows.