On Thu, Apr 2, 2009 at 7:48 PM, Mark Mentovai <m...@chromium.org> wrote:
>
> Steven Knight wrote:
>>       'official': {
>>         'defines': ['OFFICIAL_BUILD'],
>>         # Make sure units of code and data go in their own section,
>>         # and then GC them in the linker to remove unreferenced data
>>         # and code.  Currently gold doesn't support --gc-sections,
>>         # so you'll have to build with the original GNU ld.
>>         'cflags': ['-ffunction-sections', '-fdata-sections'],
>>         'linkflags': ['-Wl,--gc-sections'],
>>       },
>
> I agree with what Tom said regarding 'official' as a variant.
> variants will need to have the same restrictions that configurations
> do, meaning that they won't be able to influence 'sources' or
> 'actions' or 'rules' or anything else in input.py's
> non_configuration_keys list.  For 'official', we do need the ability
> to make changes to some non_configuration_keys, so this won't fly.
> 'official' will need to remain a GYP generation-time tunable.
>
>>       'symbols': {
>>         'cflags': ['-g'],
>>       },
>
> For Chrome's purposes, I don't see why we would ever want to build
> without symbols.  Either you're a developer and symbols are handy in a
> direct way, or you're building an official release build and symbols
> are handy for crash reporting.  In what cases would -g0 be useful?

We did this for speed, not generating debug symbols in all of your
objects, and linking together a massive binary, can cut down the build
time significantly.  Basically for a lot of people release is
something they can build and use, and debug is something they will use
for development.  The stack traces / debugging / etc in a optimized
build isn't that great anyway, so basically what you generally want is
something like:

debug - symbols
release - no symbols
official - symbols

but it is nice to be able to build a release w/ symbols if you want, a
good example is for running valgrind, etc.

>
> Mark
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to