mirror of https://github.com/YosysHQ/yosys.git
Handle setting environment on Windows
This commit is contained in:
parent
34e02addc1
commit
d678ec8f85
|
@ -41,8 +41,12 @@ struct SetenvPass : public Pass {
|
|||
if(args.size() != 3)
|
||||
log_cmd_error("Wrong number of arguments given.\n");
|
||||
|
||||
#if defined(_WIN32)
|
||||
_putenv_s(args[1].c_str(), args[2].c_str());
|
||||
#else
|
||||
setenv(args[1].c_str(), args[2].c_str(), 1);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
} SetenvPass;
|
||||
|
||||
|
|
Loading…
Reference in New Issue