craftr.ext.compiler
¶
This module provides common utility functions that are used by compiler
interface implementations, for example to convert source filenames to
object filenames using gen_objects()
.
Functions¶
-
craftr.ext.compiler.
detect_compiler
(program, language)[source]¶ Detects the compiler interface based on the specified program assuming it is used for the specified language. Returns the detected compiler or raises ToolDetectionError. Supports all available compiler toolset implementations.
-
craftr.ext.compiler.
gen_output_dir
(output_dir)[source]¶ Given an output directory that is a relative path, it will be prefixed with the current modules’ project name. An absolute path is left unchanged. If None is given, the current working directory is returned.
-
craftr.ext.compiler.
remove_flags
(command, remove_flags, builder=None)[source]¶ Helper function to remove flags from a command.
Parameters: - command – A list of command-line arguments.
- remove_flags – An iterable of flags to remove.
- builder – Optionally, a
craftr.TargetBuilder
that will be used for logging.
Returns: The “command” list, but it is also directly altered.
Exceptions¶
Submodules¶
craftr.ext.compiler._base
craftr.ext.compiler.base
craftr.ext.compiler.csc
craftr.ext.compiler.cython
craftr.ext.compiler.flex
craftr.ext.compiler.gcc
craftr.ext.compiler.java
craftr.ext.compiler.llvm
craftr.ext.compiler.msvc
craftr.ext.compiler.nvcc
craftr.ext.compiler.protoc
craftr.ext.compiler.yacc