mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Handle setting environment on Windows
This commit is contained in:
		
							parent
							
								
									8b0f665cc5
								
							
						
					
					
						commit
						1b403b82d7
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue