diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-07-19 08:29:26 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-07-19 08:29:33 +0530 |
commit | cf02c0ac1b7d8ed930a03339f639f819b3ad127b (patch) | |
tree | 34c4dbc359b469ca002f60ca9d3b0f0528d0944a /src/evanix.c | |
parent | 7d2e561246ed29eca19fe2a666ec2ae6e94964ad (diff) |
evanix: add --cache-status flag
Diffstat (limited to 'src/evanix.c')
-rw-r--r-- | src/evanix.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/evanix.c b/src/evanix.c index 4b6e4d9..42b89d7 100644 --- a/src/evanix.c +++ b/src/evanix.c @@ -18,6 +18,7 @@ static const char usage[] = " -m, --max-build Max number of builds.\n" " -r, --solver-report Print solver report.\n" " -p, --pipelined <bool> Use evanix build pipeline.\n" + " -l, --cache-status <bool> Perform cache locality check.\n" " -c, --close-unused-fd <bool> Close stderr on exec.\n" "\n"; @@ -29,6 +30,7 @@ struct evanix_opts_t evanix_opts = { .max_build = 0, .system = NULL, .solver_report = false, + .cache_status = true, }; static int evanix_build_thread_create(struct build_thread *build_thread); @@ -131,6 +133,7 @@ int main(int argc, char *argv[]) {"solver-report", no_argument, NULL, 'r'}, {"max-build", required_argument, NULL, 'm'}, {"pipelined", required_argument, NULL, 'p'}, + {"cache-status", required_argument, NULL, 'l'}, {"close-unused-fd", required_argument, NULL, 'c'}, {NULL, 0, NULL, 0}, }; @@ -194,6 +197,19 @@ int main(int argc, char *argv[]) evanix_opts.close_unused_fd = ret; break; + case 'l': + ret = atob(optarg); + if (ret < 0) { + fprintf(stderr, + "option --%s requires a bool argument\n" + "Try 'evanix --help' for more " + "information.\n", + longopts[longindex].name); + exit(EXIT_FAILURE); + } + + evanix_opts.cache_status = ret; + break; default: fprintf(stderr, "Try 'evanix --help' for more information.\n"); |