driver: add --git-hash
This commit is contained in:
parent
23e1b0656c
commit
6acb79afa2
@ -255,6 +255,7 @@ int main(int argc, char **argv)
|
|||||||
("h,help", "print this help message. If given, print help for <command>.",
|
("h,help", "print this help message. If given, print help for <command>.",
|
||||||
cxxopts::value<std::string>(), "[<command>]")
|
cxxopts::value<std::string>(), "[<command>]")
|
||||||
("V,version", "print version information and exit")
|
("V,version", "print version information and exit")
|
||||||
|
("git-hash", "print git commit hash and exit")
|
||||||
("infile", "input files", cxxopts::value<std::vector<std::string>>())
|
("infile", "input files", cxxopts::value<std::vector<std::string>>())
|
||||||
;
|
;
|
||||||
options.add_options("logging")
|
options.add_options("logging")
|
||||||
@ -332,6 +333,10 @@ int main(int argc, char **argv)
|
|||||||
std::cout << yosys_version_str << std::endl;
|
std::cout << yosys_version_str << std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
if (result.count("git-hash")) {
|
||||||
|
std::cout << yosys_git_hash_str << std::endl;
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
if (result.count("S")) {
|
if (result.count("S")) {
|
||||||
passes_commands.push_back("synth");
|
passes_commands.push_back("synth");
|
||||||
run_shell = false;
|
run_shell = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user