Reason for revert:
Appears this was innocent after all.
Original issue's description:
> Revert of Sync Windows build flags between GYP and GN (patchset #4 id:60001 of https://codereview.chromium.org/1183613006/)
>
> Reason for revert:
> Speculative revert for Linux GN clobber compile failure:
>
> FAILED: python ../../remoting/webapp/build-webapp.py ...
> Traceback (most recent call last):
> File "../../remoting/webapp/build-webapp.py", line 487, in <module>
> sys.exit(main())
> File "../../remoting/webapp/build-webapp.py", line 483, in main
> return buildWebApp(**vars(args))
> File "../../remoting/webapp/build-webapp.py", line 257, in buildWebApp
> + buildtype + ': ' + service_environment)
> Exception: Invalid service_environment targeted for Release:
> ninja: build stopped: subcommand failed.
>
> Original issue's description:
> > Sync Windows build flags between GYP and GN
> >
> > In GN, turn on omtimize:max for base targets on all platforms, not just Android (matches GYP).
> >
> > In GN, don't duplicate /Os twice, make standard optimize = /O1 (matches GYP). Don't specify redundant optimization flags that are included as part of /O1 or /O2 (doesn't match GYP flag-wise, but should match functionality-wise).
> >
> > In GN, add a min Windows version of XP to x86 architecture binaries (matches GYP).
> >
> > In GYP, remove /GT ("EnableFiberSafeOptimizations"). This flag is super old (pre-dates GYP) and was likely turned on because it has the word "optimization" in it. It was only specified in official builds. However, according to the docs, this is making optimizations fiber safe (i.e. slower, by not caching the TLS pointer), rather than enabling optimizations for fibers. We don't use fibers so this flag is unnecessary and may be making TLS access slightly slower.
> >
> > Committed: https://crrev.com/67021f4d70fe838a5d78133bc6d5b305dfd70d72
> > Cr-Commit-Position: refs/heads/master@{#334742}
>
> TBR=scottmg@chromium.org,brettw@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/1becf72a2d1b5eec4468cc950142b083e9b24fbe
> Cr-Commit-Position: refs/heads/master@{#334782}
TBR=scottmg@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1184953004
Cr-Original-Commit-Position: refs/heads/master@{#334795}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6a18ffd1f1e656bba0d905c30fad6b46ec4ffcff
Reason for revert:
Speculative revert for Linux GN clobber compile failure:
FAILED: python ../../remoting/webapp/build-webapp.py ...
Traceback (most recent call last):
File "../../remoting/webapp/build-webapp.py", line 487, in <module>
sys.exit(main())
File "../../remoting/webapp/build-webapp.py", line 483, in main
return buildWebApp(**vars(args))
File "../../remoting/webapp/build-webapp.py", line 257, in buildWebApp
+ buildtype + ': ' + service_environment)
Exception: Invalid service_environment targeted for Release:
ninja: build stopped: subcommand failed.
Original issue's description:
> Sync Windows build flags between GYP and GN
>
> In GN, turn on omtimize:max for base targets on all platforms, not just Android (matches GYP).
>
> In GN, don't duplicate /Os twice, make standard optimize = /O1 (matches GYP). Don't specify redundant optimization flags that are included as part of /O1 or /O2 (doesn't match GYP flag-wise, but should match functionality-wise).
>
> In GN, add a min Windows version of XP to x86 architecture binaries (matches GYP).
>
> In GYP, remove /GT ("EnableFiberSafeOptimizations"). This flag is super old (pre-dates GYP) and was likely turned on because it has the word "optimization" in it. It was only specified in official builds. However, according to the docs, this is making optimizations fiber safe (i.e. slower, by not caching the TLS pointer), rather than enabling optimizations for fibers. We don't use fibers so this flag is unnecessary and may be making TLS access slightly slower.
>
> Committed: https://crrev.com/67021f4d70fe838a5d78133bc6d5b305dfd70d72
> Cr-Commit-Position: refs/heads/master@{#334742}
TBR=scottmg@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1185963004
Cr-Original-Commit-Position: refs/heads/master@{#334782}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1becf72a2d1b5eec4468cc950142b083e9b24fbe
In GN, turn on omtimize:max for base targets on all platforms, not just Android (matches GYP).
In GN, don't duplicate /Os twice, make standard optimize = /O1 (matches GYP). Don't specify redundant optimization flags that are included as part of /O1 or /O2 (doesn't match GYP flag-wise, but should match functionality-wise).
In GN, add a min Windows version of XP to x86 architecture binaries (matches GYP).
In GYP, remove /GT ("EnableFiberSafeOptimizations"). This flag is super old (pre-dates GYP) and was likely turned on because it has the word "optimization" in it. It was only specified in official builds. However, according to the docs, this is making optimizations fiber safe (i.e. slower, by not caching the TLS pointer), rather than enabling optimizations for fibers. We don't use fibers so this flag is unnecessary and may be making TLS access slightly slower.
Review URL: https://codereview.chromium.org/1183613006
Cr-Original-Commit-Position: refs/heads/master@{#334742}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 67021f4d70fe838a5d78133bc6d5b305dfd70d72
This allows to do a PGO optimized build of Chrome with the following commands:
python build\gyp_chromium -Dchrome_pgo_phase=1
ninja -C out\Release chrome
run with '--no-sandbox' + pgosweep
python build\gyp_chromium -Dchrome_pgo_phase=2
ninja -C out\Release chrome
----- Approach that didn't worked -----
(see comment #13 to know why this didn't work)
Instead of having the following gyp dependency chain (for a regular build), here '->' means 'depends on':
'chrome'->|'chrome_main_dll'
----------|'chrome_child_dll'
we know have the following one (when chrome_pgo==1):
'chrome'->|'chrome_main_dll' |->'chrome_pgo_optimize'->|'chrome_main_dll_pgi'
----------|'chrome_child_dll'|-------------------------|'chrome_child_dll_pgi'
The '*_pgi' target correspond to the instrumented dll, the name of the DLLs produced by target will be terminated by '_pgi'.
During the 'chrome_pgo_optimize' step the instrumented DLLs will be renamed (the '_pgi' suffix will be removed) and Chrome will be run against a set of profile test cases, pgosweep.exe will also be invoked to collect the instrumentation data.
Then the main targets ('chrome_main_dll' and 'chrome_child_dll') will be linked with the flag /LTCG:PGOPTIMIZE, this will produce the optimized DLLs.
--------------------------------------------
R=scottmg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/187813008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@257133 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- "size"; optimizes for minimal code size, the default.
- "speed"; optimizes for speed over code size.
- "max"; turns on link time code generation and whole
program optimization, which is very expensive and should
be used sparingly.
Note that this change by itself lowers the optimization level to "size" for all targets. Separate changes to the V8 and WebKit repos will be needed to bring up their optimization levels to WPO.
BUG=108167
TEST=
Review URL: http://codereview.chromium.org/8983002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@115187 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Also, remove the Optimization hard-coded flags that turned out not to be adjustable as well.
TEST=vimdiff against ipc\ipc.vcproj of three different versions:
1) old
2) new (matches "old" except for the addition of OmitFramePointers="true" for Release x64)
3) new with `GYP_DEFINES=win_release_OmitFramePointers=0 win_release_Optimization=2`
BUG=99446,96326
Review URL: http://codereview.chromium.org/8227011
git-svn-id: http://src.chromium.org/svn/trunk/src/build@104904 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
These vsprops used to be used to setup the branding #defines.
This is now handled in common.gypi.
This is an incremental step toward dropping vsprops entirely for release.
BUG=None
TEST=None
TBR=maruel
Review URL: http://codereview.chromium.org/523020
git-svn-id: http://src.chromium.org/svn/trunk/src/build@35367 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We need some functions from dbghelp.dll to implement backtrace logic in base/debug_util_win.cc. This change will stage things so adding the new function calls won't break everyone. The delay load is in essential.vsprops because everyone will need it in order to link base after the backtrace code is added.
Review URL: http://codereview.chromium.org/67137
git-svn-id: http://src.chromium.org/svn/trunk/src/build@13818 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Doing a full build seems always fine. The issue is for incremental builds, it corrupts the PDBs. Errors look like:
glue.lib(autofill_form.obj) : fatal error LNK1318: Unexpected PDB error; RPC (23) '(0x000006BA)'
...\xmemory(155) : error C2471: cannot update program database '...\debug\obj\plugin_tests\vc80.pdb'
We'll probably need to upgrade to VS2008 to add it back.
Review URL: http://codereview.chromium.org/17208
git-svn-id: http://src.chromium.org/svn/trunk/src/build@7603 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
and better-thought-out Hammer env.Bits() idioms:
* env['PLATFORM'] == 'win32' => env.Bit('windows')
* env['PLATFORM'] == 'posix' => env.Bit('linux')
* env['PLATFORM'] == 'darwin' => env.Bit('mac')
New idioms:
* env.Bit('posix') => really does mean "any POSIX platform"
* env.AnyBits('mac', 'linux') => specifically mac or linux, excluding
other POSIX platforms
Where we were using compound conditionals (e.g., "env['PLATFORM'] in
('posix', 'darwin')") I tried to take my best shot at translating
the intent (i.e., "env.Bits('posix')" for something POSIX, "not
env.Bits('mac')" for something not yet ported to Mac, etc.)
Review URL: http://codereview.chromium.org/15051
git-svn-id: http://src.chromium.org/svn/trunk/src/build@7270 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We keep the current behavior for regular builds:
- debug: DCHECKS enabled.
- release: DCHECKS present but inactive; can be activated through the command line.
Now we add a new behavior for official builds:
- dchecks optimized away.
B=4555
Review URL: http://codereview.chromium.org/13231
git-svn-id: http://src.chromium.org/svn/trunk/src/build@6830 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* Configurable CHROME_BUILD_TYPE command line or external environment
variable for selecting appropriate release_impl*.scons settings
(_checksenabled, _coverage, _dom_stats, _official, _purify).
* Configurable CHROMIUM_BUILD command line or external environment
variable for selecting appropriate chromium_build*.scons settings
(_google_chrome).
* Configurable /INCREMENTAL linking via command line or external
environment variable ($INCREMENTAL), through appropriate setting
of an internal $CHROMIUM_INCREMENTAL_FLAGS construction variable.
* Full link of release builds by default.
* Alphabetize *.scons files in the mac_env.FilterOut() list.
* Explicitly set _checksenabled.scons link flags.
Review URL: http://codereview.chromium.org/13039
git-svn-id: http://src.chromium.org/svn/trunk/src/build@6210 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
* Add third_party/purify/pure_api.c to the base\base_lib.scons sources.
* Support specification of CHROME_BUILD_TYPE (and CHROMIUM_BUILD
while we're here) either on the command line or as an
external environment variable.
* Fix syntax error in release_impl_purify.scons (previously unused).
* Add a central $CHROMIUM_CC_OPT_FLAGS variable (included in $CCFLAGS)
that can be used to set explicitly the optimization level without
having to worry about optimization flags being pulled in from other
settings files.
Review URL: http://codereview.chromium.org/11368
git-svn-id: http://src.chromium.org/svn/trunk/src/build@5887 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
build\*.scons structure (mirroring build\*.vsprops files):
* Use env.ApplySConscript() instead of env.SConscript with a
hand-crafted dictionary defining 'env'.
* Move various CPPPATH, CCFLAGS, CPPDEFINES, LIBS and LIBPATH
definitions from build/SConscript.main and target-specific
*.scons files into the build\*.scons files that mirror the
existing build\*.vsprops hierarchy.
* Use the new build\{debug,release}.scons files to update the
windows_dbg and windows_opt construction environments.
* Mirror current support for CHROME_BUILD_TYPE and CHROMIUM_BUILD
external environment variables.
* Remove hard-coded /TP options.
* Massage $CXXFLAGS to remove $CCFLAGS, avoiding duplication of options
on command lines. Handle the ripple effect in $PCHCOM by adding
$CCFLAGS back to that command line.
* Delete hammer's default settings of {CC,LINK}FLAGS_{DEBUG,OPTIMIZED}
so they don't pollute our construction environments.
* Update chrome config to link against v8 for opt, v8_g for dbg.
* Get rid of fragile by-hand order of using_net.scons before other
using_*.scons files. We're now using --start-group and --end-group
on Linux to deal with dependency cycles in libraries.
Review URL: http://codereview.chromium.org/11478
git-svn-id: http://src.chromium.org/svn/trunk/src/build@5741 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
OmitFramePointers="false" doesn't work since this attribute would have needed to be tri-state to work correctly.
git-svn-id: http://src.chromium.org/svn/trunk/src/build@1284 4ff67af0-8c30-449e-8e8b-ad334ec8d88c