mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-14 03:05:41 +00:00
Merge pull request #6024 from YosysHQ/nella/scl-build-date
Include build datetime in scl cache hash
This commit is contained in:
commit
dddf137888
4 changed files with 11 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
namespace Yosys {
|
||||
const char *yosys_version_str = "@YOSYS_BUILD_INFO@";
|
||||
const char *yosys_git_hash_str = "@YOSYS_CHECKOUT_INFO@";
|
||||
const char *yosys_build_datetime_str = __DATE__ " " __TIME__;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,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;
|
||||
extern const char *yosys_build_datetime_str;
|
||||
const char* yosys_maybe_version();
|
||||
|
||||
// from passes/cmds/design.cc
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ inline std::string convert_liberty_files_to_merged_scl(const std::vector<std::st
|
|||
}
|
||||
|
||||
hash_input += dont_use_args;
|
||||
// Include build datetime so caches from other builds are not reused
|
||||
hash_input += yosys_build_datetime_str;
|
||||
unsigned int hash = 0;
|
||||
|
||||
for (char c : hash_input)
|
||||
|
|
|
|||
7
tests/liberty/scl_cache.ys
Normal file
7
tests/liberty/scl_cache.ys
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
read_verilog small.v
|
||||
synth -top small
|
||||
abc -liberty normal.lib
|
||||
|
||||
logger -expect log "using cached merged SCL" 1
|
||||
abc -liberty normal.lib
|
||||
logger -check-expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue