ghc-9.6.6: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.StgToJS.Linker.Linker

Description

GHCJS linker, collects dependencies from the object files which contain linkable units with dependency information

Synopsis

Documentation

embedJsFile :: Logger -> DynFlags -> TmpFs -> UnitEnv -> FilePath -> FilePath -> IO () Source #

Embed a JS file into a .o file

The JS file is merely copied into a .o file with an additional header ("//Javascript") in order to be recognized later on.

JS files may contain option pragmas of the form: //#OPTIONS: For now, only the CPP option is supported. If the CPP option is set, we append some common CPP definitions to the file and call cpp on it.