Reason for revert:
The broke the PDFium build. See
https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-PDFium/builds/2094
Original issue's description:
> Move uils and sksl to a common sources GYP file.
>
> This is for the coalescing of sources in one GYP file to improve GN runtime. If
> this is successful, the other sources lists will also be merged into this one
> file.
>
> Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens.
>
> Removes the chromium defines gypi which is no longer referenced.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302723005
>
> Committed: https://skia.googlesource.com/skia/+/39f7a10a04a914384944d8bf62621144ac4eeaa3TBR=mtklein@chromium.org,brettw@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2317683002
This is for the coalescing of sources in one GYP file to improve GN runtime. If
this is successful, the other sources lists will also be merged into this one
file.
Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens.
Removes the chromium defines gypi which is no longer referenced.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302723005
Review-Url: https://codereview.chromium.org/2302723005
This file will be imported by Chrome to access the sources lists.
Once Chrome is updated to use this file, changes to the skia .gypi layout can
be done entirely within the skia repository as long as the resulting lists
produced by the new .gni file have the same name.
Marks skia_for_chromium_defines as obsolete and moves the definition into the new .gni file. We can remove the .gypi file when Chrome is updated.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302803005
Review-Url: https://codereview.chromium.org/2302803005
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
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
- 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
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
exec_script runs every time gn does, which is explicitly on every one of our
bot runs. That should be enough to obviate the .git/logs/HEAD hack.
Easiest way to do this was to swap around find.py's argument order to allow
multiple search directories. This is the root of all the .gyp changes.
This moves the blacklist into BUILD.gn, which I think is nice.
It expands it a little as we're now searching recursively, into include/gpu/vk
which we can't include safely without the Vulkan SDK.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205903004
Review-Url: https://codereview.chromium.org/2205903004
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
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
- Make fiddle build on Mac (skipping GL).
- Now that we're building in SkCodec, we depend on libpng and libjpeg-turbo unconditionally, not just on Linux.
- Re-arrange third_party a bit so that our targets are Fuchsia/Chrome compatible.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184133002
NOTREECHECKS=true
This doesn't affect Chrome/Blink, so landing through the closed tree.
Review-Url: https://codereview.chromium.org/2184133002
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