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.
Review URL: http://codereview.chromium.org/5664

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2008-10-02 09:41:01 +00:00
parent 864ebf14ad
commit d759938461
2 changed files with 6 additions and 5 deletions

View File

@ -77,8 +77,9 @@ LIBRARY_FLAGS = {
'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 @@ SAMPLE_FLAGS = {
'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'],

View File

@ -7,7 +7,7 @@
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="0"
Optimization="3"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="0"