E1882: strict mode rejects a manually chosen linker

View source

A freestanding program is linked with the linker that ships with the compiler, so that the same toolchain links it on every machine (ADR-0041, ADR-0105).

A freestanding program is linked with the linker that ships with the compiler, so that the same toolchain links it on every machine (ADR-0041, ADR-0105). Under --strict, naming another linker for a freestanding entry contract is an error, whether the name comes from linker in [build] or from the ACTUS_LINKER environment variable. A name in the manifest is reported at its value, as in Actus.toml: error[E1882] at 7:10; a name from the environment names no file, so the report is error[E1882]: message. Without --strict the chosen linker is used.

Example

toml
[package]
name = "app"
version = "0.1.0"

[build]
entry_contract = "freestanding"
linker = "custom-ld"
actus
verb main() {
}

Fix

Remove the linker key, so that the bundled linker is used.

toml
[package]
name = "app"
version = "0.1.0"

[build]
entry_contract = "freestanding"
actus
"""Entry point of the example; it does nothing and returns no value."""
verb main() {
}

Run actus explain E1882 in your terminal to read this entry offline. Browse Strict & toolchain or all error codes.