craftr.ext.compiler.llvm

craftr.ext.compiler.llvm.detect(program)

Assuming program points to Clang or Clang++, 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 Clang++)
Raises:
  • OSError – If program can not be executed (eg. if it does not exist).
  • ToolDetectionError – If program is not Clang or Clang++.
class craftr.ext.compiler.llvm.LlvmCompiler(program, language, desc=None, **kwargs)

Interface for the LLVM compiler.

compile(sources, frameworks=(), target_name=None, meta=None, **kwargs)

Supported options:

  • include
  • defines
  • language
  • debug
  • std
  • pedantic
  • pic
  • warn
  • optimize
  • autodeps
  • description
  • osx_fwpath
  • osx_frameworks
  • program
  • additional_flags
  • gcc_additional_flags
  • gcc_compile_additional_flags
  • llvm_additional_flags
  • llvm_compile_additional_flags

Target meta variables: none

Supported options:

  • debug
  • lib
  • gcc_libs
  • llvm_libs
  • linker_args
  • gcc_linker_args
  • llvm_linker_args
  • linker_script
  • libpath
  • external_libs
  • osx_fwpath
  • osx_frameworks
  • description
  • program
  • additional_flags
  • gcc_additional_flags
  • gcc_link_additional_flags
  • llvm_additional_flags
  • llvm_link_additional_flags

Target meta variables:

  • link_output – The output filename of the link operation.
name = 'LLVM'
craftr.ext.compiler.llvm.Compiler

alias of LlvmCompiler