Add a C wrapper that calls the Fortran runtime initialization and
finalization routines as well as the compiled Fortran main program
_QQmain.
Place it in its own library to satisfy shared library builds since it
contains a C main function.
Differential D110851
[flang] Add a wrapper for Fortran main program jeanPerier on Sep 30 2021, 10:03 AM. Authored by
Details Add a C wrapper that calls the Fortran runtime initialization and Place it in its own library to satisfy shared library builds since it
Diff Detail
Event Timeline
Comment Actions Does anyone knows why build bots are not running on this patch (only arc lint + unit seems to be done) ? I pushed the change by accident (arc patched another approved patch on the wrong branch....) and reverted it, but in the meantime I got some windows failure with this patch: 0.181 [141/5/1] Building C object tools\flang\runtime\CMakeFiles\obj.Fortran_main.dir\Fortran_main.c.obj FAILED: tools/flang/runtime/CMakeFiles/obj.Fortran_main.dir/Fortran_main.c.obj C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe [...] flang\runtime\Fortran_main.c C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\flang\include\flang/Runtime/stop.h(30): error C2143: syntax error: missing ')' before '=' C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\flang\include\flang/Runtime/stop.h(30): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\flang\include\flang/Runtime/stop.h(30): error C2072: '_FortranAExit': initialization of a function C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\flang\include\flang/Runtime/stop.h(30): error C2059: syntax error: ')' So I am wondering how I can make sure I do not break windows here when I find a fix for this. |
Do we need a LLVM header in this file?