mirror of
https://github.com/YosysHQ/yosys
synced 2025-12-17 17:58:32 +00:00
Merge pull request #5538 from YosysHQ/emil/driver-git-hash
driver: add --git-hash
This commit is contained in:
commit
1cceaa2a80
5 changed files with 22 additions and 16 deletions
|
|
@ -255,6 +255,7 @@ int main(int argc, char **argv)
|
|||
("h,help", "print this help message. If given, print help for <command>.",
|
||||
cxxopts::value<std::string>(), "[<command>]")
|
||||
("V,version", "print version information and exit")
|
||||
("git-hash", "print git commit hash and exit")
|
||||
("infile", "input files", cxxopts::value<std::vector<std::string>>())
|
||||
;
|
||||
options.add_options("logging")
|
||||
|
|
@ -332,6 +333,10 @@ int main(int argc, char **argv)
|
|||
std::cout << yosys_version_str << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
if (result.count("git-hash")) {
|
||||
std::cout << yosys_git_hash_str << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
if (result.count("S")) {
|
||||
passes_commands.push_back("synth");
|
||||
run_shell = false;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ extern std::set<std::string> yosys_input_files, yosys_output_files;
|
|||
|
||||
// from kernel/version_*.o (cc source generated from Makefile)
|
||||
extern const char *yosys_version_str;
|
||||
extern const char *yosys_git_hash_str;
|
||||
const char* yosys_maybe_version();
|
||||
|
||||
// from passes/cmds/design.cc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue