-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding version display option with --version #1897
base: master
Are you sure you want to change the base?
Adding version display option with --version #1897
Conversation
spike_main/spike.cc
Outdated
@@ -38,6 +38,7 @@ static void help(int exit_code = 1) | |||
fprintf(stderr, " -s Command I/O via socket (use with -d)\n"); | |||
#endif | |||
fprintf(stderr, " -h, --help Print this help message\n"); | |||
fprintf(stderr, " --version Print spike version\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spike uses two spaces as indent.
spike_main/spike.cc
Outdated
fprintf(stdout, "Spike RISC-V ISA Simulator " SPIKE_VERSION "\n\n"); | ||
exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two spaces
spike_main/spike.cc
Outdated
@@ -387,6 +394,7 @@ int main(int argc, char** argv) | |||
parser.option(0, "l2", 1, [&](const char* s){l2.reset(cache_sim_t::construct(s, "L2$"));}); | |||
parser.option(0, "big-endian", 0, [&](const char UNUSED *s){cfg.endianness = endianness_big;}); | |||
parser.option(0, "misaligned", 0, [&](const char UNUSED *s){cfg.misaligned = true;}); | |||
parser.option(0, "version", 0, [&](const char UNUSED *s){state_version();}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed all indentation issues
Please clean up the commit history so there's only one commit. |
Fixing indents to be 2 spaces instead of tabs
a683d90
to
18edd18
Compare
Wanted to put --version to have version checks easily with scripts using spike.