Add builtin constants ‘langVersion’ and ‘nixVersion’
The integer constant ‘langVersion’ denotes the current language version. It gets increased every time a language feature is added/changed/removed. It's currently 1. The string constant ‘nixVersion’ contains the current Nix version, e.g. "1.2pre2980_9de6bc5".
This commit is contained in:
		
							parent
							
								
									5943f41b8b
								
							
						
					
					
						commit
						8b8ee53bc7
					
				
					 6 changed files with 18 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -23,6 +23,7 @@ AM_CXXFLAGS = -Wall \
 | 
			
		|||
 -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
 | 
			
		||||
 -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
 | 
			
		||||
 -DNIX_BIN_DIR=\"$(bindir)\" \
 | 
			
		||||
 -DNIX_VERSION=\"$(VERSION)\" \
 | 
			
		||||
 -I$(srcdir)/.. -I$(srcdir)/../libutil \
 | 
			
		||||
 -I$(srcdir)/../libstore
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -197,4 +197,7 @@ Settings::SettingsMap Settings::getOverrides()
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const string nixVersion = NIX_VERSION;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -190,4 +190,7 @@ private:
 | 
			
		|||
extern Settings settings;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern const string nixVersion;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue