Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Monday 05 of November 2012, Michael Meeks wrote:
      Why do I extensively use that option, though I'm not a packager:

      * I like to run the code the end-user runs - warts and all.

 In other words, you like to skip the various checks that are there in the 
debug build. Or maybe you like to test the compiler but not LibreOffice 
itself. Hmm, okay, whatever.

      * I like to be able to profile accurately without re-building
        everything (cf. above)

 It's amazing how many develolopers put profiling so high in their priorities. 
Even higher than being able to debug accurately without re-building, or being 
able to verify the code without re-building.

On Monday 05 of November 2012, Michael Stahl wrote:
On 05/11/12 17:59, Stephan Bergmann wrote:
On 11/05/2012 05:15 PM, Michael Meeks wrote:
   * I like to run the code the end-user runs - warts and all.

Note that what the end user runs is -O2 rather than -Os IIUC.

yes...and no. both are true actually:
[0] ms@bastet:/master > git grep -- "-O2" solenv/gbuild/ | wc -l
18
[0] ms@bastet:/master > git grep -- "-Os" solenv/gbuild/ | wc -l
10
[0] ms@bastet:/master > git grep -- "-O " solenv/gbuild/platform/ | wc -l
2

so if you want to do profiling you simply have to look up which one your
particular architecture uses first to get meaningful numbers.

 I don't think it works like that. What users run is most probably what's been 
build using that MSVC thingy, which doesn't understand either of the options. 
Barring that, what the remaining users most probably run has been built using 
whichever options were used for building their distro package (which is AFAIK 
usually something explicitly given, so that's about how much packagers need 
this). So much for running what the users run. And of course, it's a question 
if the -Os/-O2 difference is significant in most profiling runs anyway.

On Monday 05 of November 2012, Norbert Thiebaud wrote:
On Mon, Nov 5, 2012 at 10:59 AM, Stephan Bergmann <sbergman@redhat.com> 
wrote:
Note that what the end user runs is -O2 rather than -Os IIUC.

actually that is platform and even sometime source dependent.
which makes global level carpet bombing using CFLAGS/CXXFLAGS/LDFLAGS
a not necessarily appealing option.

 You are probably confusing CXXFLAGS as in "the flags that are passed to the 
compiler" and CXXFLAGS that are passed to gbuild, which is not the same. The 
latter just replaces -Ox/-gx flags that gbuild uses by default (and which are 
already used globally). So this is not, and cannot be, source dependent, as 
anything source dependent needs to be specified explicitly when handling that 
source, and is not overriden by global flags. And even the platform dependent 
argument looks rather weak, the only thing that doesn't understand -Os is 
probably MSVC, and who here actually develops using that (in addition to 
something else)?

 See? It's not so simple. But anyway, as I said, I'll gladly pass having all 
the fun to whoever manages to put the option back without breaking something 
else.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.