Commits

Anonymous committed eac6cca

"NoOptimization" flag added.

Comments (0)

Files changed (3)

src/actions/vstudio/vs200x_vcproj.lua

 		vc200x.VCCL_MinimalRebuild(cfg)
 		vc200x.VCCL_BasicRuntimeChecks(cfg)
 
-		if vc200x.optimization(cfg) ~= 0 then
+		-- Should not create too much penalty in generation time even for NoOptimization
+		if premake.config.isoptimizedbuild(cfg) then
 			_p(4,'StringPooling="%s"', bool(true))
 		end
 
 		if not premake.config.isoptimizedbuild(cfg)
 			and not cfg.flags.Managed
 			and not cfg.flags.NoRuntimeChecks
+			and not cfg.flags.NoOptimization
 		then
 			_p(4,'BasicRuntimeChecks="3"')
 		end
 			"Optimize",
 			"OptimizeSize",
 			"OptimizeSpeed",
+			"NoOptimize",
 			"SEH",
 			"StaticRuntime",
 			"Symbols",

src/base/config.lua

 
 	function premake.config.isdebugbuild(cfg)
 		-- If any of the optimize flags are set, it's a release a build
-		if cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed then
+		if cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed or cfg.flags.NoOptimize then
 			return false
 		end
 		-- If symbols are not defined, it's a release build
 --
 	
 	function premake.config.isoptimizedbuild(cfg)
-		return cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed
+		return cfg.flags.Optimize or cfg.flags.OptimizeSize or cfg.flags.OptimizeSpeed or cfg.flags.NoOptimize
 	end