Skip to content

Commit

Permalink
Parse "-l foo" linker arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Jun 4, 2015
1 parent 0c604c6 commit ca49da4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apk-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ fn parse_arguments() -> (Args, Vec<String>) {
result_passthrough.push(arg);
result_passthrough.push(path);
},
"-l" => {
let name = args.next().expect("-l must be followed by a library name");
result_shared_libraries.insert(vec!["lib", &name, ".so"].concat());

// Also pass these through.
result_passthrough.push(arg);
result_passthrough.push(name);
}
_ => {
if arg.starts_with("-l") {
result_shared_libraries.insert(vec!["lib", &arg[2..], ".so"].concat());
Expand Down

0 comments on commit ca49da4

Please sign in to comment.