Common Build Tools #
This file defines general utilities that abstract common build functionality and provides some common concrete build functions.
General Utilities #
Check if the info is up-to-date by comparing depTrace with traceFile.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build info unless it already exists and depTrace matches that
of the traceFile. If rebuilt, save the new depTrace to the tracefile.
Returns whether info was already up-to-date.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build info unless it already exists and depTrace matches that
of the traceFile. If rebuilt, save the new depTrace to the tracefile.
Equations
- Lake.buildUnlessUpToDate info depTrace traceFile build = discard (Lake.buildUnlessUpToDate' info depTrace traceFile build)
Instances For
Fetch the trace of a file that may have its hash already cached in a .hash file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute the hash of a file and save it to a .hash file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build file using build unless it already exists and depTrace matches
the trace stored in the .trace file. If built, save the new depTrace and
cache file's hash in a .hash file. Otherwise, try to fetch the hash from
the .hash file using fetchFileTrace.
By example, for file := "foo.c", compare depTrace with that in foo.c.trace
and cache the hash using foo.c.hash.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build file using build after dep completes if the dependency's
trace (and/or extraDepTrace) has changed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build file using build after deps have built if any of their traces change.
Equations
- Lake.buildFileAfterDepList file deps build extraDepTrace = do let __do_lift ← liftM (Lake.BuildJob.collectList deps) Lake.buildFileAfterDep file __do_lift build extraDepTrace
Instances For
Build file using build after deps have built if any of their traces change.
Equations
- Lake.buildFileAfterDepArray file deps build extraDepTrace = do let __do_lift ← liftM (Lake.BuildJob.collectArray deps) Lake.buildFileAfterDep file __do_lift build extraDepTrace
Instances For
Common Builds #
A build job for file that is expected to already exist (e.g., a source file).
Equations
- Lake.inputFile path = Lake.Job.async ((fun (x : Lake.BuildTrace) => (path, x)) <$> Lake.computeTrace path)
Instances For
Build an object file from a source file job using compiler. The invocation is:
compiler -c -o oFile srcFile weakArgs... traceArgs...
The traceArgs are included as part of the dependency trace hash, whereas
the weakArgs are not. Thus, system-dependent options like -I or -L should
be weakArgs to avoid build artifact incompatibility between systems
(i.e., a change in the file path should not cause a rebuild).
You can add more components to the trace via extraDepTrace,
which will be computed in the resulting BuildJob before building.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build an object file from a source fie job (i.e, a lean -c output) using leanc.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a static library from object file jobs using the ar packaged with Lean.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build an executable by linking the results of linkJobs using leanc.
Equations
- One or more equations did not get rendered due to their size.