Add -l option

This commit is contained in:
Rui Ueyama 2020-08-25 11:02:38 +09:00
parent b0109a30c9
commit bc2527944a
1 changed files with 10 additions and 0 deletions

10
main.c
View File

@ -162,6 +162,11 @@ static void parse_args(int argc, char **argv) {
continue;
}
if (!strncmp(argv[i], "-l", 2)) {
strarray_push(&input_paths, argv[i]);
continue;
}
if (!strcmp(argv[i], "-cc1-input")) {
base_file = argv[++i];
continue;
@ -495,6 +500,11 @@ int main(int argc, char **argv) {
for (int i = 0; i < input_paths.len; i++) {
char *input = input_paths.data[i];
if (!strncmp(input, "-l", 2)) {
strarray_push(&ld_args, input);
continue;
}
char *output;
if (opt_o)
output = opt_o;