Reviewers: Christian Plesner Hansen, Description: Changed optimization from /Ox to the (more) commonly used /O2 (which includes /GF) in both SCons and Visual Studio build. There is not mesurable difference neither in speed nor in code size.
Added whole program optimization to the SCons release build. This clutters the linking of the samples a little with the option /LTCG. This option is not strictly needed for linking, but if it is not specified the linker complaints as it can see object files compiled with /GL and then restarts itself with /LTCG which dosen't look very pretty. Please review this at http://codereview.chromium.org/5664 Affected files: M SConstruct M tools/visual_studio/release.vsprops Index: tools/visual_studio/release.vsprops =================================================================== --- tools/visual_studio/release.vsprops (revision 404) +++ tools/visual_studio/release.vsprops (working copy) @@ -7,7 +7,7 @@ <Tool Name="VCCLCompilerTool" RuntimeLibrary="0" - Optimization="3" + Optimization="2" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="0" Index: SConstruct =================================================================== --- SConstruct (revision 404) +++ SConstruct (working copy) @@ -77,8 +77,9 @@ 'LINKFLAGS': ['/DEBUG'] }, 'mode:release': { - 'CCFLAGS': ['/Ox', '/MT', '/GF'], - 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'] + 'CCFLAGS': ['/O2', '/MT', '/GL'], + 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'], + 'ARFLAGS': ['/LTCG'] } } } @@ -205,8 +206,8 @@ 'LINKFLAGS': ['/MAP'] }, 'mode:release': { - 'CCFLAGS': ['/Ox', '/MT', '/GF'], - 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'] + 'CCFLAGS': ['/O2', '/MT'], + 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'] }, 'mode:debug': { 'CCFLAGS': ['/Od', '/MTd'], --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
