shake-language-c-0.6.3: Utilities for cross-compiling with Shake

Safe HaskellNone
LanguageHaskell98

Development.Shake.Language.C.Target.NaCl

Description

This module provides toolchain definitions and utilities for targeting Google Pepper and Portable Native Client (PNaCl). Arguably it should be renamed appropriately. See Development.Shake.Language.C.Rules for examples of how to use a target toolchain.

Synopsis

Documentation

pepper :: Int -> Version Source

Stable Pepper API version.

canary :: Version Source

Unstable Pepper Canary API version.

target :: Target Source

Pepper target.

LLVM_IR (PNaCl) is the only supported target architecture at the moment.

data Config Source

Pepper build configuration.

This is used to select the respective library versions when linking.

Constructors

Debug 
Release 

Instances

toolChain Source

Arguments

:: FilePath

Pepper SDK directory (nacl_sdk)

-> Version

Pepper API version, see pepper and canary

-> Config

Build configuration for linked libraries

-> Target

Target, see target

-> ToolChain

Resulting toolchain

Construct Pepper toolchain.

finalize Source

Arguments

:: ToolChain

Toolchain, see toolChain

-> FilePath

Bit code input executable

-> FilePath

Finalised bit code output executable

-> Action () 

Finalize a bit code executable.

translate :: ToolChain -> Arch -> FilePath -> FilePath -> Action () Source

Translate bit code to native code.

data Arch Source

Pepper target architecture

Constructors

PNaCl

Portable Native Client architecture

NaCl Arch

Native Client architecture for specific CPU architecture

Instances

mk_nmf Source

Arguments

:: [(Arch, FilePath)]

List of executables with the corresponding architecture

-> FilePath

Output file

-> Action () 

Create Native Client Manifest (nmf) file.

This file is needed for serving NaCl/PNaCl outside the Google Play store. See the native client documentation for more information on the file format.