Bug 174128 - [cmake] Use -pipe by default for compiling C++ files with g++
Summary: [cmake] Use -pipe by default for compiling C++ files with g++
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Konstantin Tokarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-04 05:43 PDT by Konstantin Tokarev
Modified: 2017-07-16 02:19 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.66 KB, patch)
2017-07-04 05:49 PDT, Konstantin Tokarev
achristensen: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2017-07-04 05:43:14 PDT
[cmake] Use -pipe by default for compiling C++ files with g++
Comment 1 Konstantin Tokarev 2017-07-04 05:49:47 PDT
Created attachment 314562 [details]
Patch
Comment 2 Michael Catanzaro 2017-07-11 20:35:19 PDT
Comment on attachment 314562 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314562&action=review

So the best description I've found for this is:

https://wiki.gentoo.org/wiki/GCC_optimization#-pipe

Basically it means the build should be a bit faster, at the expense of requiring a bit more memory.

Have you done a comparison? I'm reluctant to push anything that will increase memory requirements for builds, especially if it's not going to be a significant speed increase.

> Source/cmake/OptionsCommon.cmake:82
> +        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe")

It should be the opposite:

set(CMAKE_CXX_FLAGS "-pipe ${CMAKE_CXX_FLAGS}")

(So that it can be overridden.)
Comment 3 Alex Christensen 2017-07-12 10:42:48 PDT
Comment on attachment 314562 [details]
Patch

Michael's comment needs to be addressed, and we need measurements of peak memory use with and without -pipe and build time with and without -pipe.  Please measure more than once.
Comment 4 Konstantin Tokarev 2017-07-16 02:19:47 PDT
Turns out that -pipe has no positive effect. On Linux I got neutrals result, while in Windows VM with MinGW it's even negative