Build Info #
This module defines the Lake build info type and related utilities. Build info is what is the data passed to a Lake build function to facilitate the build.
The type of Lake's build info.
- moduleFacet (module : Lake.Module) (facet : Lean.Name) : Lake.BuildInfo
- packageFacet (package : Lake.Package) (facet : Lean.Name) : Lake.BuildInfo
- libraryFacet (lib : Lake.LeanLib) (facet : Lean.Name) : Lake.BuildInfo
- leanExe (exe : Lake.LeanExe) : Lake.BuildInfo
- staticExternLib (lib : Lake.ExternLib) : Lake.BuildInfo
- dynlibExternLib (lib : Lake.ExternLib) : Lake.BuildInfo
- target (package : Lake.Package) (target : Lean.Name) : Lake.BuildInfo
Instances For
Build Info & Keys #
Build Key Helper Constructors #
Equations
- Lake.Module.facetBuildKey facet self = Lake.BuildKey.moduleFacet self.keyName facet
Instances For
Equations
- Lake.Package.facetBuildKey facet self = Lake.BuildKey.packageFacet self.name facet
Instances For
Equations
- Lake.Package.targetBuildKey target self = Lake.BuildKey.customTarget self.name target
Instances For
Equations
- self.facetBuildKey facet = Lake.BuildKey.targetFacet self.pkg.name self.name (`leanLib ++ facet)
Instances For
Equations
- self.buildKey = Lake.BuildKey.targetFacet self.pkg.name self.name Lake.LeanExe.exeFacet
Instances For
Equations
- self.staticBuildKey = Lake.BuildKey.targetFacet self.pkg.name self.name Lake.ExternLib.staticFacet
Instances For
Equations
- self.dynlibBuildKey = Lake.BuildKey.targetFacet self.pkg.name self.name Lake.ExternLib.dynlibFacet
Instances For
Build Info to Key #
The key that identifies the build in the Lake build store.
Equations
- (Lake.BuildInfo.moduleFacet m f).key = Lake.Module.facetBuildKey f m
- (Lake.BuildInfo.packageFacet p f).key = Lake.Package.facetBuildKey f p
- (Lake.BuildInfo.libraryFacet l f).key = l.facetBuildKey f
- (Lake.BuildInfo.leanExe x_1).key = x_1.buildKey
- (Lake.BuildInfo.staticExternLib l).key = l.staticBuildKey
- (Lake.BuildInfo.sharedExternLib l).key = l.sharedBuildKey
- (Lake.BuildInfo.dynlibExternLib l).key = l.dynlibBuildKey
- (Lake.BuildInfo.target p t).key = Lake.Package.targetBuildKey t p
Instances For
Build Info & Facets #
Complex Builtin Facet Declarations #
Additional builtin facets missing from Build.Facets
.
These are defined here because they need configuration definitions
(e.g., Module
), whereas the facets there are needed by the configuration
definitions.
The direct local imports of the Lean module.
Equations
- Lake.Module.importsFacet = `lean.imports
Instances For
The transitive local imports of the Lean module.
Equations
- Lake.Module.transImportsFacet = `lean.transImports
Instances For
The transitive local imports of the Lean module.
Equations
- Lake.Module.precompileImportsFacet = `lean.precompileImports
Instances For
Shared library for --load-dynlib
.
Equations
- Lake.Module.dynlibFacet = `dynlib
Instances For
A Lean library's Lean modules.
Equations
- Lake.LeanLib.modulesFacet = `modules
Instances For
The package's complete array of transitive dependencies.
Equations
- Lake.Package.depsFacet = `deps
Instances For
Facet Build Info Helper Constructors #
Definitions to easily construct BuildInfo
values for module, package,
and target facets.
Build info for the module's specified facet.
Equations
- Lake.Module.facet facet self = Lake.BuildInfo.moduleFacet self facet
Instances For
The direct local imports of the Lean module.
Equations
- self.imports = Lake.Module.facet Lake.Module.importsFacet self
Instances For
The transitive local imports of the Lean module.
Equations
- self.transImports = Lake.Module.facet Lake.Module.transImportsFacet self
Instances For
The transitive local imports of the Lean module.
Equations
- self.precompileImports = Lake.Module.facet Lake.Module.precompileImportsFacet self
Instances For
The facet which builds all of a module's dependencies
(i.e., transitive local imports and --load-dynlib
shared libraries).
Returns the list of shared libraries to load along with their search path.
Equations
- self.deps = Lake.Module.facet Lake.Module.depsFacet self
Instances For
The core build facet of a Lean file.
Elaborates the Lean file via lean
and produces all the Lean artifacts
of the module (i.e., olean
, ilean
, c
).
Its trace just includes its dependencies.
Equations
- self.leanArts = Lake.Module.facet Lake.Module.leanArtsFacet self
Instances For
The olean
file produced by lean
.
Equations
- self.olean = Lake.Module.facet Lake.Module.oleanFacet self
Instances For
The ilean
file produced by lean
.
Equations
- self.ilean = Lake.Module.facet Lake.Module.ileanFacet self
Instances For
The C file built from the Lean file via lean
.
Equations
- self.c = Lake.Module.facet Lake.Module.cFacet self
Instances For
The C file built from the Lean file via lean
.
Equations
- self.bc = Lake.Module.facet Lake.Module.bcFacet self
Instances For
The object file built from c
/bc
.
On Windows with the C backend, no Lean symbols are exported.
On every other configuration, symbols are exported.
Equations
- self.o = Lake.Module.facet Lake.Module.oFacet self
Instances For
The object file built from c
/bc
(with Lean symbols exported).
Equations
- self.oExport = Lake.Module.facet Lake.Module.oExportFacet self
Instances For
The object file built from c
/bc
(without Lean symbols exported).
Equations
- self.oNoExport = Lake.Module.facet Lake.Module.oNoExportFacet self
Instances For
The object file .c.o
built from c
.
On Windows, this is c.o.noexport
, on other systems it is c.o.export
).
Equations
- self.co = Lake.Module.facet Lake.Module.coFacet self
Instances For
The object file .c.o.export
built from c
(with -DLEAN_EXPORTING
).
Equations
- self.coExport = Lake.Module.facet Lake.Module.coExportFacet self
Instances For
The object file .c.o.noexport
built from c
(without -DLEAN_EXPORTING
).
Equations
- self.coNoExport = Lake.Module.facet Lake.Module.coNoExportFacet self
Instances For
The object file .bc.o
built from bc
.
Equations
- self.bco = Lake.Module.facet Lake.Module.bcoFacet self
Instances For
Shared library for --load-dynlib
.
Equations
- self.dynlib = Lake.Module.facet Lake.Module.dynlibFacet self
Instances For
Build info for the package's specified facet.
Equations
- Lake.Package.facet facet self = Lake.BuildInfo.packageFacet self facet
Instances For
A package's cached build archive (e.g., from Reservoir or GitHub). Will cause the whole build to fail if the archive cannot be fetched.
Equations
- self.buildCache = Lake.Package.facet Lake.Package.buildCacheFacet self
Instances For
A package's optional cached build archive (e.g., from Reservoir or GitHub). Will NOT cause the whole build to fail if the archive cannot be fetched.
Equations
- self.optBuildCache = Lake.Package.facet Lake.Package.optBuildCacheFacet self
Instances For
A package's Reservoir build archive from Reservoir. Will cause the whole build to fail if the barrel cannot be fetched.
Equations
- self.reservoirBarrel = Lake.Package.facet Lake.Package.reservoirBarrelFacet self
Instances For
A package's optional build archive from Reservoir. Will NOT cause the whole build to fail if the barrel cannot be fetched.
Equations
- self.optReservoirBarrel = Lake.Package.facet Lake.Package.optReservoirBarrelFacet self
Instances For
A package's build archive from a GitHub release. Will cause the whole build to fail if the release cannot be fetched.
Equations
- self.gitHubRelease = Lake.Package.facet Lake.Package.gitHubReleaseFacet self
Instances For
A package's optional build archive from a GitHub release. Will NOT cause the whole build to fail if the release cannot be fetched.
Equations
- self.optGitHubRelease = Lake.Package.facet Lake.Package.optGitHubReleaseFacet self
Instances For
Instances For
Instances For
A package's extraDepTargets
mixed with its transitive dependencies'.
Equations
- self.extraDep = Lake.Package.facet Lake.Package.extraDepFacet self
Instances For
Build info for a custom package target.
Equations
- Lake.Package.target target self = Lake.BuildInfo.target self target
Instances For
Build info of the Lean library's Lean binaries.
Equations
- self.facet facet = Lake.BuildInfo.libraryFacet self facet
Instances For
A Lean library's Lean modules.
Equations
- self.modules = self.facet Lake.LeanLib.modulesFacet
Instances For
A Lean library's Lean artifacts (i.e., olean
, ilean
, c
).
Equations
- self.leanArts = self.facet Lake.LeanLib.leanArtsFacet
Instances For
A Lean library's static artifact.
Equations
- self.static = self.facet Lake.LeanLib.staticFacet
Instances For
A Lean library's static artifact (with exported symbols).
Equations
- self.staticExport = self.facet Lake.LeanLib.staticExportFacet
Instances For
A Lean library's extraDepTargets
mixed with its package's.
Equations
- self.extraDep = self.facet Lake.LeanLib.extraDepFacet
Instances For
Build info of the Lean executable.
Equations
- self.exe = Lake.BuildInfo.leanExe self
Instances For
Build info of the external library's static binary.
Equations
- self.static = Lake.BuildInfo.staticExternLib self
Instances For
Build info of the external library's dynlib.
Equations
- self.dynlib = Lake.BuildInfo.dynlibExternLib self