mirror of https://github.com/rui314/chibicc
Add -l option
This commit is contained in:
parent
b0109a30c9
commit
bc2527944a
10
main.c
10
main.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue