confu package

confu module

class confu.Platform(name)

A combination of processor architecture, operating system (or runtime environment), and optionally ABI and C library.

This class identifies host (where the code is compiled) and target (where the code will run) systems, and encapsulates information about the system, which doesn’t depend on toolchains or installed packages, e.g.

  • Processor architecture and basic instruction set
  • Target operating system or runtime environment (e.g. Emscripten)
  • Application binary interface (e.g. hard-float vs soft-float)
  • Type of C library (e.g. GNU LibC, Newlib)
  • Extension of object and executable files on the system (e.g. module.o, module.bc, module.obj)
  • Static library naming conventions on the system (e.g. libcalc.a, libcalc.la, calcs.lib)
  • Dynamic library naming conventions on the system (e.g. libcalc.so, libcalc.dylib, calc.dll)
Variables:name

normalized identifier of the platform. Identifier has two or three dash-separated parts: the first denotes CPU architecture, the second – operating system or runtime environment. The third, optional, part denotes the type of C library and ABI. Examples:

  • “x86_64-linux-gnu”
  • “x86_64-linux-gnux32”
  • “ppc64le-linux-gnu”
  • “arm-linux-gnueabihf”
  • “aarch64-linux-gnu”
  • “x86_64-macos”
  • “x86_64-nacl-gnu”
  • “x86_64-nacl-newlib”
  • “pnacl-nacl-newlib”
  • “asmjs-emscripten”
  • “wasm32-emscripten”

Platform object is created from an informal name identifier.

Parameters:name (str) –

identifier for a platform. Examples:

  • “x86_64-linux” (same as “x86_64-linux-gnu”)
  • “ppc64le-linux” (same as “ppc64le-linux-gnu”)
  • “arm-linux” (same as “arm-linux-gnueabihf”)
  • “arm64-linux” (same as “aarch64-linux-gnu”)
  • “aarch64-linux” (same as “aarch64-linux-gnu”)
  • “x32” (same as “x86_64-linux-gnux32”)
  • “x86_64-nacl” (same as “x86_64-nacl-newlib”)
  • “pnacl” (same as “pnacl-nacl-newlib”)
  • “asmjs” (same as “asmjs-emscripten”)
  • “wasm” (same as “wasm32-emscripten”)