Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

As Flang’s code generation support is still in experimental statestage, in order to build binaries with flang-new an undocumented flag needs to be used: -flang-experimental-exec.

...

Running Flang under gdb can help in the process of understanding how each part of the code works and in locating which part may be misbehaving. The first step is to make a debug build. The following cmake flags can help in speeding up the build and gdb load timetimes:

Code Block
LLVM_USE_SPLIT_DWARF=ON
LLVM_USE_LINKER=lld
LLVM_OPTIMIZED_TABLEGEN=ON

...

To debug issues with the frontend, first get its invocation command line with flang-new -v -c <file> and then use that with gdb instead, to avoid having to handle forks when debugging.

...