Commits

Yuriy O'Donnell committed 2bfa50f

Added 'LinkTimeCodeGeneration' flag (Whole Program Optimization).
Only implemented for vs2010.

Comments (0)

Files changed (2)

src/actions/vstudio/vs2010_vcxproj.lua

 				path.getbasename(cfg.buildtarget.name))
 		end
 
+		if cfg.flags.LinkTimeCodeGeneration then
+			_p(3, '<WholeProgramOptimization>true</WholeProgramOptimization>')
+		end
+
 		if cfg.flags.NoFramePointer then
 			_p(3,'<OmitFramePointers>true</OmitFramePointers>')
 		end
 				_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)
 				additional_options(2,cfg)
 				link_target_machine(2,cfg)
+				if cfg.flags.LinkTimeCodeGeneration then
+					_p(2, '<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>')
+				end
 			_p(1,'</Lib>')
 		end
 	end
 				_p(3,'<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>')
 			end
 
+			if cfg.flags.LinkTimeCodeGeneration then
+				_p(3, '<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>')
+			end
+
 			import_lib(cfg)
 			link_target_machine(3,cfg)
 			additional_options(3,cfg)
+
 		end
 
 		_p(2,'</Link>')
 				"FatalWarnings",
 				"FloatFast",
 				"FloatStrict",
+				"LinkTimeCodeGeneration",
 				"Managed",
 				"MFC",
 				"NativeWChar",