craftr.ext.compiler.gcc

craftr.ext.compiler.gcc.detect(program)[source]

Assuming program points to GCC or GCC++, this function determines meta information about it. The returned dictionary contains the following keys:

  • version
  • version_str
  • name
  • target
  • thread_model
  • cpp_stdlib (only present for GCC++)
Raises:
  • OSError – If program can not be executed (eg. if it does not exist).
  • ToolDetectionError – If program is not GCC or GCC++.
class craftr.ext.compiler.gcc.GccCompiler(program, language='c', desc=None, **kwargs)[source]

Interface for the GCC compiler.

Note

Currently inherits the LLVM implementation. Will eventually get its own implementatio in the future, but not as long as the LLVM version works well for GCC, too.

name = 'GCC (Craftr-LLVM-Backend)'