rules/odin/odinfmt/toolchain.js
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
ODINFMT_TOOL
const ODINFMT_TOOL
Undocumented.
odinfmtCommandName()
odinfmtCommandName(plat)
Undocumented.
olsTriple()
olsTriple(plat)
Return the OLS release triple for a platform.
| Parameter | Type | Description |
|---|---|---|
| plat | { os: string, arch: string } |
Returns: string
odinfmtArtifactName()
odinfmtArtifactName(version, plat)
Return the OLS release artifact filename bundling odinfmt for a version and platform.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| plat | { os: string, arch: string } |
Returns: string
odinfmtDownloadUrl()
odinfmtDownloadUrl(version, plat)
Return the OLS release download URL bundling odinfmt for a version and platform.
| Parameter | Type | Description |
|---|---|---|
| version | string | |
| plat | { os: string, arch: string } |
Returns: string
odinfmtGraphTool()
odinfmtGraphTool(version)
Build odinfmt from its verified OLS archive as a graph tool.
OdinfmtToolchain (implementation class)
class OdinfmtToolchain
Implementation class. BUILD files should use odinfmtToolchain().
Undocumented.
odinfmtToolchain()
odinfmtToolchain(version, opts = {})
Declare an odinfmt toolchain, pinned to an Odin toolchain version. Omit version to track the workspace's default Odin toolchain version. defaults to the bundled //rules/odin/odinfmt/odinfmt.lock. Point this at your own lock (regenerate via imp goal gen-lockfiles) when pinning a version the bundled lock does not know. matching lockfile entry (warns instead of failing).
| Parameter | Type | Description |
|---|---|---|
| [version] | string | |
| [opts] | object | |
| [opts.default=false] | boolean | Set as the default odinfmt target. |
| [opts.lockfile] | string | Lockfile address pinning download SHA-256s; |
| [opts.unverified=false] | boolean | Allow downloading without a |
Returns: object Target handle for this odinfmt toolchain.
odinfmtGenLockfiles()
odinfmtGenLockfiles(version, opts = {})
The [GEN_LOCKFILES] root for an odinfmt toolchain version. This is a separate function from odinfmtToolchain(). odinfmtToolchain() returns a frozen tool() handle. A frozen object cannot hold an extra property. If you omit version, this function uses the workspace's default Odin toolchain version, same as odinfmtToolchain() does. one declared on the toolchain. Defaults to the address odinfmtToolchain(version, { lockfile }) declared, so a workspace states it once.
| Parameter | Type | Description |
|---|---|---|
| [version] | string | |
| [opts] | object | |
| [opts.lockfile] | string | Write this lockfile address instead of the |
Returns: object { [GEN_LOCKFILES]: ... }.
defaultOdinfmtToolchain()
defaultOdinfmtToolchain()
Return the currently configured default odinfmt toolchain target handle.
Returns: object|null