Skip to content

Instantly share code, notes, and snippets.

@killerswan
Created December 16, 2013 07:53
Show Gist options
  • Save killerswan/7983652 to your computer and use it in GitHub Desktop.
Save killerswan/7983652 to your computer and use it in GitHub Desktop.
warning at compile and nonsensical error at runtime when using librustc
meow $ make build_testloop
rustc -o ./bin/testloop --bin -Z debug-info -Z extra-debug-info --opt-level=3 src/testloop.rs
warning: no debug symbols in executable (-arch x86_64)
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
@killerswan
Copy link
Author

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()));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment