Commit Graph

16 Commits

Author SHA1 Message Date
mtklein
233eb0adc7 Include $extra_ldflags in link descriptions.
I overlooked this this morning.  Not hugely important, but nice to see.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2303933002

Review-Url: https://codereview.chromium.org/2303933002
2016-09-02 11:24:50 -07:00
mtklein
bb35a6aa2d GN: add extra_ldflags
This is mostly just handy for hacking around while building out other GN features.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300963003

Review-Url: https://codereview.chromium.org/2300963003
2016-09-01 09:15:44 -07:00
mtklein
7957872f39 GN: release -> -O3, to match GYP
-O3 does trigger some important compiler optimizations that -Os does not,
like autovectorization.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288813002

Review-Url: https://codereview.chromium.org/2288813002
2016-08-29 10:23:15 -07:00
mtklein
a28e263d42 Roll GN
This picks up efc976e502, which means we don't need to create a link_pool any more.  The default behavior is unlimited linking, what we were asking for explicitly.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288253002

Review-Url: https://codereview.chromium.org/2288253002
2016-08-29 07:14:28 -07:00
mtklein
cab0bb7fc6 GN: support compiler_prefix, use it for ccache on bots.
This makes it considerably easier to use ccache with the Android NDK.
You can now just set
  compiler_prefix = "ccache"
  ndk = "/path/to/ndk"
and we'll use the NDK clang, wrapped with ccache.

The name compiler_prefix is stolen from / compatible with Chrome.

If you have ccache, you can just always leave compiler_prefix="ccache" enabled.
This should make it an unusual thing for humans to have to change cc or cxx.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281163002

Review-Url: https://codereview.chromium.org/2281163002
2016-08-26 13:43:19 -07:00
mtklein
349cecefe2 GN: mac host and armv7 target
Just when I thought it wouldn't be useful to override ar...

Tested by building 32- and 64-bit DM on my MBP and running it on my N5x.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2279703003

Review-Url: https://codereview.chromium.org/2279703003
2016-08-26 08:13:04 -07:00
mtklein
7d6fb2c92d GN: Android
Once you have downloaded an android NDK, you can set the ndk GN arg to use it.
E.g. my gn.args looks like:
  is_debug = false
  ndk = "/opt/android-ndk"

This should be enough to get you going for an arm64 build.  You ought to be able to tweak that to other architectures by changing target_cpu to "arm", "x86", "x86-64", etc.  That won't quite work until I follow this up a bit, but the skeleton is there.

This is enough to get me compiled, linked, and running to completion on my N5x.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275983004

Review-Url: https://codereview.chromium.org/2275983004
2016-08-25 14:50:44 -07:00
mtklein
9b8583dd1f GN: misc
- Use options' template pattern for opts too.
  - Simplify opt's and options' configs... they should all be the same.
  - When building a static-library component in our GN environment (i.e. libskia.a),
    make it a complete static lib, fully containing its transitive deps.
  - It has not proved useful to override ar.

TBR=jcgregorio@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278673002

Review-Url: https://codereview.chromium.org/2278673002
2016-08-24 17:32:30 -07:00
mtklein
15d71ff537 include extra_cflags* in the step description
This keeps them visible on the bots.
E.g. https://luci-milo.appspot.com/swarming/task/30b9147a09f2ac10/steps/ninja/0/stdout

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254733008

Review-Url: https://codereview.chromium.org/2254733008
2016-08-19 04:27:34 -07:00
mtklein
8079ba688c 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

Review-Url: https://codereview.chromium.org/2241263003
2016-08-16 09:31:16 -07:00
mtklein
d434b01c7e Roll GN: gn format is --in-place by default
As usual, might as well roll, and this new behavior is a small convenience.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231833002

Review-Url: https://codereview.chromium.org/2231833002
2016-08-10 07:30:58 -07:00
halcanary
19a9720978 GN: build sfntly, icu, harfbuzz
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2200833010

Review-Url: https://codereview.chromium.org/2200833010
2016-08-03 15:08:04 -07:00
mtklein
5db44aa2aa GN: components as static library instead of source set
This also puts the .a in the top-level of the ouptut directory, just
like we do for .so files.  It's less required than for .sos, but it
does make it easier to find the .a.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197633002

Review-Url: https://codereview.chromium.org/2197633002
2016-07-29 09:10:31 -07:00
mtklein
f05c2c22a7 GN: add abbreviated versions of the command line as descriptions.
This should help make the bot logs a little easier to read.  (On the console
this wasn't much of a big deal, as Ninja auto-abbreviates when printing to an
interactive console.)

As usual, Ninja will print the full command when a task fails.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188263002

Review-Url: https://codereview.chromium.org/2188263002
2016-07-28 11:42:34 -07:00
mtklein
8796ff1fbc Turn on flags to enforce SK_API.
These flags hide symbols that are not marked with SK_API when linked into a
shared library.  There's nominally no effect on static linking, but I'm
pretty sure the Mac linker takes some advantage of this too to run faster.

This makes component-build DM no longer link: it uses many non SK_API APIs.
Fiddle in contrast is just fine with our public APIs, so no need to restrict that.

It'll be fun finding out which of our other tools go which ways.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180383003

Review-Url: https://codereview.chromium.org/2180383003
2016-07-27 14:59:08 -07:00
mtklein
7fbfbbe8f4 Basic standalone GN configs.
This sketches out what a world without Chrome's GN configs would look like.

Instead of DEPSing in build/, we now host our own gypi_to_gn.py.

The symlink from skia/ to . lets us run gclient hooks when the .gclient file is in the directory above skia/ or inside skia/.  That means we don't need gn.py anymore.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167163002

Review-Url: https://codereview.chromium.org/2167163002
2016-07-21 12:25:45 -07:00