From 6acb79afa26e91682e576c8d0a1e185147cb4bc4 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Tue, 9 Dec 2025 11:58:57 +0100 Subject: [PATCH] driver: add --git-hash --- kernel/driver.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/driver.cc b/kernel/driver.cc index 06fa6b11b..fa78bad59 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -255,6 +255,7 @@ int main(int argc, char **argv) ("h,help", "print this help message. If given, print help for .", cxxopts::value(), "[]") ("V,version", "print version information and exit") + ("git-hash", "print git commit hash and exit") ("infile", "input files", cxxopts::value>()) ; 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;