Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Issue 2241263003: GN: add extra_cflags et al. (Closed)

Created:
4 years, 4 months ago by mtklein_C
Modified:
4 years, 4 months ago
Reviewers:
jcgregorio, mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

GN: add extra_cflags et al. Adding flags to the end of cc or cxx is pretty useful, but these always end up on the command line before the GN generated flags, thus setting defaults that GN will override. For full flexibility we want to be able to add flags after the flags GN has added, so that custom flags can override _it_. I've updated the Fast bots with an example here: if we said cc="clang -O3 ...", that '-O3' would be overriden later by the default Release-mode '-Os'. By putting it in extra_cflags, we get the last word: our '-O3' overrides the default '-Os'. Another good use case is a hypothetical Actually-Shippable-Release mode. Our Release mode bundles in tons of debug symbols via '-g'. libskia.a is about 10x larger than it needs to be when built that way, but it helps us debug the bot failures immensely. To build a libskia.{a,so} that you'd really ship, you can now set extra_cflags="-g0" to override '-g'. You could set '-march' flags there too, '-fomit-frame-pointer', etc. There are lots of flags that won't matter where they end up in the command line. To keep everything simple I've put them in extra_cflags with the rest. This means the only time we change 'cc' or 'cxx' in our recipes is to prefix 'ccache'. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241263003 Committed: https://skia.googlesource.com/skia/+/8079ba688c69af14932c200e579090a70e699f41

Patch Set 1 #

Patch Set 2 : quote manually #

Messages

Total messages: 16 (12 generated)
mtklein_C
4 years, 4 months ago (2016-08-16 15:37:25 UTC) #11
jcgregorio
Oooh, I'm going to add -g0 to the fiddle build to see if this speeds ...
4 years, 4 months ago (2016-08-16 15:49:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2241263003/20001
4 years, 4 months ago (2016-08-16 16:06:26 UTC) #14
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 16:31:20 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://skia.googlesource.com/skia/+/8079ba688c69af14932c200e579090a70e699f41

Powered by Google App Engine
This is Rietveld 408576698