3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-08 18:51:28 +00:00

Fix tmpdir naming when passing -nocleanup option to abc(9) on systems where base_tmpdir isn't /tmp/

This commit is contained in:
N. Engelhardt 2022-09-09 17:57:57 +02:00 committed by N. Engelhardt
parent dd4a0c3034
commit da614fe13a
2 changed files with 12 additions and 6 deletions

View file

@ -404,9 +404,12 @@ struct Abc9Pass : public ScriptPass
if (!active_design->selected_whole_module(mod))
log_error("Can't handle partially selected module %s!\n", log_id(mod));
std::string tempdir_name = get_base_tmpdir() + "/" + proc_program_prefix() + "yosys-abc-XXXXXX";
if (!cleanup)
tempdir_name[0] = tempdir_name[4] = '_';
std::string tempdir_name;
if (cleanup)
tempdir_name = get_base_tmpdir() + "/";
else
tempdir_name = "_tmp_";
tempdir_name += proc_program_prefix() + "yosys-abc-XXXXXX";
tempdir_name = make_temp_dir(tempdir_name);
if (!lut_mode)