shake-language-c-0.11.0: 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 Executable Source #

Executable specification for Native Client Manifest (nmf) files.

Constructors

Executable 

Fields

data Program Source #

Program specification for Native Client Manifest (nmf) files.

Constructors

Program 

Fields

mk_nmf Source #

Arguments

:: Program

Program specification

-> FilePath

Output file

-> Action () 

Create Native Client Manifest (nmf) files.

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