Skip to content

librustc cannot be used as a library? #11026

Closed
@killerswan

Description

@killerswan

When running my program:

meow $ make run_loop
./bin/testloop ./src/demo.rs --test
<<<< building tests >>>>
error: multiple input filenames provided
task 'rustc' failed at 'explicit failure', /Users/kevin/code/rust/src/librustc/driver/driver.rs:1054
task '<main>' failed at 'explicit failure', /Users/kevin/code/rust/src/librustc/lib.rs:398
make: *** [run_loop] Error 101

The "multiple input filenames provided" error is due to using the same arguments with librustc::main_args as I was using with the rustc executable. :(

https://github.com/killerswan/meow/compare/librustc#diff-7df04b77326b8a50f8284f3ac22257e3L119

That's pretty weird considering that the function I'm using is called like so inside rustc:

pub fn main() {
    std::os::set_exit_status(main_args(std::os::args()));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions