abc: always write tmp files to TMPDIR

It is still possible to have it in CWD if TMPDIR is set to CWD.
The way it was is not ideal for logging purposes of large projects,
as this can create huge amounts of data best stored on some
scratch disk instead of the main drive.
This commit is contained in:
phsauter 2024-11-12 00:04:23 +01:00
parent 3f2b391036
commit 625ff7b9cd
1 changed files with 1 additions and 4 deletions

View File

@ -728,10 +728,7 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin
po_map.clear();
std::string tempdir_name;
if (cleanup)
tempdir_name = get_base_tmpdir() + "/";
else
tempdir_name = "_tmp_";
tempdir_name = get_base_tmpdir() + "/";
tempdir_name += proc_program_prefix() + "yosys-abc-XXXXXX";
tempdir_name = make_temp_dir(tempdir_name);
log_header(design, "Extracting gate netlist of module `%s' to `%s/%s'..\n",