Skip to main content

target_from_program

Function target_from_program 

Source
pub fn target_from_program(program: &str) -> Option<String>
Expand description

The target a program name asks for, the way aarch64-linux-gnu-gcc is gcc for that target.

program is the path the compiler was started as. The name without its directory and without a trailing .exe has to end in -rucc, and what comes before that has to be a target this compiler knows, or there is no answer and the name means nothing. A link named my-rucc is therefore just rucc and not an error.