diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-10-01 23:26:57 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-10-02 19:10:43 -0700 |
commit | 6799d5048886a3c61b200bf367f305bf8c068164 (patch) | |
tree | c0feda885320511f6a95e137cbc9b049ae4cb930 /muse | |
parent | ea60cdb464fe0bb4d289fb841304a44539d24593 (diff) | |
download | mc-6799d5048886a3c61b200bf367f305bf8c068164.tar.gz |
Propagate extra libraries through the system.
Diffstat (limited to 'muse')
-rw-r--r-- | muse/muse.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/muse/muse.c b/muse/muse.c index 96dd5e1..c00ade6 100644 --- a/muse/muse.c +++ b/muse/muse.c @@ -21,6 +21,8 @@ int show; char debugopt[128]; char **incpaths; size_t nincpaths; +char **extralibs; +size_t nextralibs; static void usage(char *prog) { @@ -52,7 +54,7 @@ int main(int argc, char **argv) size_t i; FILE *f; - optinit(&ctx, "d:hmo:I:", argv, argc); + optinit(&ctx, "d:hmo:I:l:", argv, argc); while (!optdone(&ctx)) { switch (optnext(&ctx)) { case 'h': @@ -69,6 +71,9 @@ int main(int argc, char **argv) case 'I': lappend(&incpaths, &nincpaths, ctx.optarg); break; + case 'l': + lappend(&extralibs, &nextralibs, ctx.optarg); + break; case 's': show = 1; break; @@ -85,6 +90,7 @@ int main(int argc, char **argv) exit(1); } + /* read and parse the file */ file = mkfile("internal"); file->file.globls = mkstab(0); updatens(file->file.globls, outfile); @@ -93,6 +99,9 @@ int main(int argc, char **argv) mergeuse(ctx.args[i]); infer(file); tagexports(file, 1); + addextlibs(file, extralibs, nextralibs); + + /* generate the usefile */ f = fopen(outfile, "w"); if (debugopt['s'] || show) dumpstab(file->file.globls, stdout); |