Skip to main content

BUILTINS

Constant BUILTINS 

Source
pub const BUILTINS: &str = "librucc_builtins.a";
Expand description

Our own runtime library, which every one of the three lines below carries.

Named once because three callers ask about it by name: the line that puts it on, crate::argv::argv when -fno-builtins-lib asks for it to be left off, and the driver that goes looking for the file. A second spelling of the name anywhere is a flag that stops working the day the first one is renamed.

Where the file is, is not this crate’s answer and used to be. Every line below named it inside the sysroot, as sysroot.lib().join(BUILTINS), and nothing ever put it there: it is this compiler’s own output for the target rather than anything the platform ships, cargo xtask builtins writes it beside the compiler, and a sysroot fetched from a release will never hold it. So the lines take the path from whoever built them, which is the driver, and this constant is the name alone. tamnd/rucc#1514.