Commit Graph

50 Commits

Author SHA1 Message Date
Mike Klein
0266c8a4e6 allow overriding {target,host}_link = ... in GN
This lets it be something other than cxx,
e.g. to compile with Goma but to link with the NDK locally,

    declare_args() {
      home = getenv("HOME")
      use_goma = true
      _target = "aarch64-linux-android21"
    }
    ndk = "$home/ndk"

    extra_asmflags = []
    extra_cflags = []
    extra_ldflags = []

    if (use_goma) {
      cc = "$home/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
      cxx = "$home/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
      cc_wrapper = "$home/depot_tools/.cipd_bin/gomacc"

      target_cc = cc
      target_cxx = cxx
      target_link = "$ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=$_target"

      extra_asmflags += [ "--target=$_target" ]
      extra_cflags += [ "--target=$_target" ]
    } else {
      cc_wrapper = "ccache"
    }

    is_debug = true
    if (is_debug) {
      extra_cflags += [ "-Os" ]
    }

Change-Id: I17b9c3f72bc308e40c1565536d04d0673efd4ef1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332616
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-11-05 19:40:47 +00:00
Corentin Wallez
5619c3af3d GN: Add support for GN's framework variable in the toolchain
This is a recent addition to GN that Dawn takes advantages of but which
Skia's GN toolchain didn't implement yet.

Bug:
Change-Id: I7a592bd4663db5c9726767bedf46c38d9c86ed2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307576
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-03 15:41:37 +00:00
Ben Wagner
57d859edd3 Create a gn link pool which is disabled by default.
The oss-fuzz build of Skia seems to have difficulty when it does too
many linker steps at a time. Ninja will generally not launch new build
steps if the load is too high, but the oss-fuzz builder machines are
slow enough that the load doesn't seem to rise fast enough to prevent
too many linkers from be started at a time.

By default this change does not request a linker pool at all and the
user must request one by setting the link_pool_depth. Negative values
disable the linker pool, zero sets the number to the number of cpus, and
positive values set the pool size. This should allow for some
experimentation while testing what pool size is appropriate for the fuzz
builders while not changing current default behavior.

Bug: oss-fuzz:23438,oss-fuzz:24345
Change-Id: Iba62adac3bea4d968441aa08e33918b5ae962c7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306646
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-29 20:28:40 +00:00
Stephen White
5e454f8359 Fix MSVC build.
Use $shell prefix invoking python for cp.py.

Change-Id: Ic4b40337255a91fe6f9729eb58ecb6d47c559001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306334
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-29 18:35:28 +00:00
Jim Van Verth
eba2958922 Revert "Switch GN defs on Mac and iOS to use frameworks instead of libs."
This reverts commit c61e35dbc6.

Reason for revert: Breaking builds

Original change's description:
> Switch GN defs on Mac and iOS to use frameworks instead of libs.
> 
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
> 
> Change-Id: I67b118457721975ac2408308438d71172be66592
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,jvanverth@google.com

Change-Id: I7b81a92a67181e08ee57bcb184768794281cd37a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300228
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-07-01 19:53:47 +00:00
Jim Van Verth
c61e35dbc6 Switch GN defs on Mac and iOS to use frameworks instead of libs.
GN will be removing support for frameworks in the libs variable, so
might as well get ahead of it.

Change-Id: I67b118457721975ac2408308438d71172be66592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-01 18:55:05 +00:00
Ben Wagner
ee2ffc3b43 Delete .a file before writing static library.
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.

This is similar to what Chromium currently does in gcc_toolchain.gni.
However, we cannot always just use 'rm' because of the build for Android
on Windows, so this introduces 'rm.py' which is just like 'cp.py' but
without the copy part.

Bug: skia:10363
Change-Id: Icc0c3d18dab1e48ccfec47386662c7b4d2dc8811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295569
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-11 17:19:23 +00:00
Ben Wagner
771d3a214e Revert "Delete .a file before writing static library."
This reverts commit 3b035e0417.

Reason for revert: Build-Win-Clang-arm64-Release-Android runs on
                   Windows and uses llvm-ar.

Original change's description:
> Delete .a file before writing static library.
> 
> The ar utility only adds symbols. As a result removed symbols are
> sometimes still present in later builds, leading to great confusion.
> Delete the .a file before recreating it with ar.
> 
> This is similar to what Chromium currently does in gcc_toolchain.gni.
> 
> Bug: skia:10363
> Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=mtklein@google.com,bungeman@google.com

Change-Id: I02ba93ce26eedb2b2362e96d2ebfcacbfb8e0902
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10363
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295445
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-06-10 13:44:39 +00:00
Ben Wagner
3b035e0417 Delete .a file before writing static library.
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.

This is similar to what Chromium currently does in gcc_toolchain.gni.

Bug: skia:10363
Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-10 13:25:05 +00:00
John Stiles
ceeb256374 Wrap copy-tool path in quotes.
This prevents a build failure if Skia is installed to a path with a space in it.

Change-Id: I3f9a6d435971720a32c3ac14c9eb144f2da563a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280183
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-01 23:45:56 +00:00
Mike Klein
a01c6b0b59 reformat GN files
Change-Id: I2d19c4f0ff1439dcd923a3064eb3ba78432a5113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281043
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-04-01 23:23:03 +00:00
Martin Vejdarski
6e58290ba6 set lib_switch to empty for the msvc toolchain
Change-Id: I0d94bf055413ab7911136256f2ce2cda3581f45a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275656
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-06 19:32:50 +00:00
Florin Malita
f11fd1f6e7 Python3 tweaks
Change-Id: Ie951106bbd7a91dd76b30a56ede9313c88e657ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260499
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-17 17:12:03 +00:00
Hal Canary
389c8e9d2d [minor] mark scripts as executable
if a filename ends with `.py` and  the file begins with '#!.*python.*',
make it executable.

Change-Id: I41de516ff37343d3b0979bde9fd61813aec7365c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254439
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-11-21 17:06:27 +00:00
Robert Phillips
c919f97768 Reformat gn files
Change-Id: I60ccd1ef19d6a6dc033e20e7ac55c3182d76ea0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255082
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-18 16:39:28 +00:00
John Rosasco
24cbdab97e SKQP Build for Fuchsia SDK
Change-Id: I2619784eca0f7a4dd66f2db0104cb746d9266b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244369
Commit-Queue: John Rosasco <rosasco@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-18 12:34:28 +00:00
Mike Klein
c466945ddd tweak ar/libtool setup
This is what I was getting at on the comments in PS 5.

Change-Id: I5435860ebea9ed01217d7acb378e1fadce19b107
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250776
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-25 18:21:22 +00:00
Herb Derby
740f85949d Redo removing annoying link messages
From mac's man libtool
   Libtool with -static is intended to replace ar(5) and ranlib

Libtool allows RSP files, and has -no_warning_for_no_symbols

Change-Id: I1d61095db02ae83fdf491c26eae7d9d4cefc2d17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250337
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-24 18:04:54 +00:00
Ben Wagner
edcce3145a [gn] Add pool for dsymutil
dsymutil seems to kill the machine when too many processes are run in
parallel, so we need to use a pool to limit the concurrency when
passing large -j to Ninja (e.g. Goma build).

Change-Id: I84404291db4781f86268256ab888cef8d07c770e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234477
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-09-03 14:08:09 +00:00
Ben Wagner
d51ea41ce4 [gn] Move dsymutil from link command to a separate action
Change-Id: I18a3bd5e845305e3b2521d076fd641bd5175b618
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234327
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-09-03 14:02:49 +00:00
Hal Canary
452ce044f0 iOS toolchain: no -soname for is_component_build=true
Change-Id: I81835ffdd1fbdaa12d662527e38b42532f2ea8e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238756
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-03 13:52:49 +00:00
Ben Wagner
fd91d20a46 [gn] Don't use cc_wrapper for link steps
I'm aware of two uses for cc_wrapper:
 - Goma support for linking is experimental, and normally just falls
   back to the local compiler.
 - ccache site says it always falls back to the real compiler for
   linking. https://ccache.dev/

The msvc toolchain already does not use cc_wrapper for linking; this
change removes it for gcc_like_toolchain. This matches Chromium, e.g.
2cde7f21ab/build/toolchain/gcc_toolchain.gni (221)

Change-Id: I7199c23343233a2435e4d28e7269f67efac36d72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234316
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-13 16:15:48 +00:00
Ben Wagner
ab961e9db1 Use MD instead of MMD for compile dependencies.
The current use of MMD appears to ignore all includes which are resolved
from pointy bracket includes or system paths. This can lead to very
interesting incomplete rebuilds (or no rebuild at all) when updating
third_party headers or when the system headers are updated. The use of
MD makes the build depend on all the headers transitively included no
matter how they were included. This greatly increases the dependencies,
but only so much as to make them correct (barring the ever difficult
issue of a file being created with the same name earlier in the search
path).

Change-Id: I852e617f23b4ff0c5b4eb3068455428c9568e078
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232762
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-06 21:18:01 +00:00
Hal Canary
f72728e3f1 documentation/build, BUILDCONFIG: Visual Studio Build Tools 2019
deprecate 2015

Docs-Preview: https://skia.org/?cl=226502
Change-Id: I32cd75937ebdc774138499c4cd79c1eda29bd0f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226502
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-07-12 14:17:16 +00:00
Mike Klein
5b52c52141 simplify Android NDK build config
If you just use the right compiler driver wrapper, recent NDKs automate
lots of the stuff we used to have to do ourselves.

Simplifying further, bump baseline ndk_api from 16 (Jellybean) on 32-bit
machines and 21 (Lollipop) on 64-bit to 21 across the board.  This makes
using libc++ a lot easier, as it hooks into a bunch of APIs that were
added in 18 and 21.  There's probably some way to work around this, but
the easiest thing is to just roll up.

Tested building {x86,arm}x{32,64} from a Linux host,
   and running  {    arm}x{32,64}.

Kind of flailing around in later CLs trying to get linking not to hang
on Windows.  I figure it's got something to do with lld?

Cq-Include-Trybots: skia.primary:Build-Win-Clang-arm64-Release-Android
Change-Id: I340b06fb9d372281146679d932417aaba3196045
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225506
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-07-03 18:47:11 +00:00
Jim Van Verth
ffacf656c8 Updates to iOS build
* Enable data bundling for all test apps unless specifically disabled.
* Add support to bundle symbols so that the stack trace in Instruments
  is correct.

Bug: skia:7525
Change-Id: I5eef9fa21ecee8f790b0736f5e23c9d678e47bef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205001
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-04-02 17:24:46 +00:00
Florin Malita
a9a3dccf55 solink with --start-group/--end-group
(based on https://skia-review.googlesource.com/c/skia/+/145529/)

Bug: skia:
Change-Id: Id8fb7dd706748f9ad602cc35a4e0d9b87ca97e00
Reviewed-on: https://skia-review.googlesource.com/c/196381
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-28 16:44:00 +00:00
Brian Osman
b2a00250a1 Fix PATH and EXE quoting for Windows ARM64 builds
The PATH change we make is the only thing that needs Windows style
paths (and won't be fixed by GN). So, undo the other backslashes,
and fix a minor error in the placement of the quote.

Bug: skia:8569
Change-Id: I4feecaac96a4cf4d221a93e852a63f597e25e892
Reviewed-on: https://skia-review.googlesource.com/c/175825
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-12-10 15:54:18 +00:00
Mike Klein
a6e0c2b19c use lld-link any time we have it
Might open up some neat options like LTO builds.
If nothing it's nice to use each whole toolchain consistently.

Move around some bonus quotes a bit.

LLD doesn't understand /DEBUG:FASTLINK.

Change-Id: I27e3c97acea6980c5bd006394aebb1e103007edd
Reviewed-on: https://skia-review.googlesource.com/c/175981
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-12-10 14:59:44 +00:00
Brian Salomon
42ec7d774b Link using lld-link when target_os="win" and host_os != "win"
Compile using clang-cl rather than clang-cl.exe

Change-Id: Ibc0350c6d2a38dd3dbf4efdefa85a39ce418cb0c
Reviewed-on: https://skia-review.googlesource.com/c/175830
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-10 13:40:15 +00:00
Brian Osman
a098265198 Fix PATH when running MSVC for ARM64 target
The ARM64 MSVC toolchain only includes some of the executables. Other
functionality is in DLLs that are located in the host (x64) toolchain
directory. Hopefully MS fixes this at some point.

Bug: skia:8569
Change-Id: I1a96c63c9bdcf656eb2d84b81636d54304766c20
Reviewed-on: https://skia-review.googlesource.com/c/175821
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-07 21:06:25 +00:00
Mike Klein
26ad6da9b6 link with --start-group/--end-group
These flags let symbols cross-link from anything in the group.

This becomes useful if we try to make more parts of Skia
components, letting binaries link .a static libraries that
depend on each other without worrying about the order they're
specified on the link line / in the .rsp file.

Few of our bots should be affected by this, as lld doesn't
really need this workaround.

Change-Id: I75f4cc069a2c82c7898d510a6b8b5cf1b8bdbe50
Reviewed-on: https://skia-review.googlesource.com/145529
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-07 16:18:01 +00:00
Brian Osman
e530e5153f Stop using rsp files for compiling on Windows
Chrome stopped using them in January:
https://chromium-review.googlesource.com/c/chromium/src/+/832593

For them, it significantly accelerated goma builds. From my tests,
I think we'll see some small speedup. Note that our older build
system invoked through CMD, which limited us to 8k of command line.
GN/ninja don't do that, so we have the full 32k limit. However,
we do use CMD to do our 32-bit builds... But that doesn't matter,
becase AFAICT the longest command line we generate right now is
only about 2.5k long.

Note that (like Chromium) this continues to use rsp files to link.
Those command lines *can* become ridiculously long.

The original motivation, and a nice benefit of this change:
It makes the output of ninja's compdb tool much more useful.
That tool emits JSON in a standard format describing the commands
used to build each source file. Other tools (eg Visual Studio Code)
can parse that JSON, and deduce the correct defines and include
paths to help with symbol navigation.

Change-Id: I73124f13d5117a0c31445cf6ce1c506d2f73609f
Reviewed-on: https://skia-review.googlesource.com/142584
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-19 20:23:25 +00:00
Ben Wagner
96aa535b78 Remove .bat and .exe from commands where possible.
We expect .BAT and .EXE to be on PATHEXT. Also, although Python
CreateProcess doesn't honor PATHEXT, it will try .EXE. This allows most
commands to be platform-independent, and also resolves the issue with
the cpython package not including python.bat.

No-Tree-Checks: true
Docs-Preview: https://skia.org/?cl=135626
Bug: chromium:852581
Change-Id: Iab4189407df44ff4ad4d37da07ff52414229d397
Reviewed-on: https://skia-review.googlesource.com/135626
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-19 17:29:15 +00:00
Kaloyan Donev
f7466bd84a Support x86 build with VS 2015
Pass extra assembler flags to the asm tool in msvc toolchain

My first commit so added my name to the AUTHORS file.

Change-Id: I19529a901be6d9c00df3c0880003be3363475c6e
Reviewed-on: https://skia-review.googlesource.com/114740
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-03-19 15:20:35 +00:00
Ben Wagner
df574048f5 Add Win Clang x86 builds.
Enable /arch:SSE2 for Win x86 builds (both MSVC and Clang).

Change-Id: I0618e938b6542b60fae3947b7e0dcde22650ba54
Reviewed-on: https://skia-review.googlesource.com/56721
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-13 20:30:28 +00:00
Hal Canary
e1053eaca2 BUILD: link and solink uses rsp file
Motivation: building for android on windows was failing for me.
Change-Id: Ia74bb99331edbe2cc9b0281e4c9ff7bbc00b08e6
Reviewed-on: https://skia-review.googlesource.com/106262
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-02-10 00:15:31 +00:00
Brian Osman
852ca318a1 Updated MSVC toolchain to 2017, and further refactored GN
'windk' is no longer a thing. There are two separate variables to point
at your compiler (win_vc), and SDK (win_sdk).

'msvc' is no longer a thing, either. By default, we look for 2017 and
then 2015 (in the default locations). If neither is located, use an
assert to let users know they should set win_vc. Then, detect if win_vc
points at a 2017 or 2015 installation, and configure it automatically.

Because the toolchain is now 2017, update the GN files to handle building
x86 in that configuration. In fact, we only support x86 builds (with 2017
or 2015) using the toolchain assets. Keep a 2015 toolchain around as a
new asset, so we can add bot coverage.

Docs-Preview: https://skia.org/?cl=81841
Bug: skia:
Change-Id: I8c68a6f949e54c0e798a219450bbb9406f8dc6ac
Reviewed-on: https://skia-review.googlesource.com/81841
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-08 01:46:30 +00:00
Brian Osman
d34c4a3727 Add win_toolchain_version to support MSVC 2017 Updates
To make this simpler in the future, add a python script that finds the
most recent 2017 toolchain, and use that. If/when we update the bot
toolchain, this will be even more helpful, because the Chromium toolchain
isn't perfectly in sync with the general update channel, so people are
likely to have a newer/older release locally.

Note that explicitly setting win_toolchain_version in your GN args
suppresses the python script, so you can choose to build with whatever
version you need.

Bug: skia:
Change-Id: Iaf6d0dd9be2623472118c3ad27b20023a205d67c
Reviewed-on: https://skia-review.googlesource.com/81162
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-06 19:15:55 +00:00
Jim Van Verth
443a913b8f Add create_bundle support for GN
Docs-Preview: https://skia.org/?cl=75383
Bug: skia:7339
Change-Id: I985734e8b7b5af21a82cb8ee59acbfb5ff1d3ff7
Reviewed-on: https://skia-review.googlesource.com/75383
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-28 15:29:07 +00:00
Brian Osman
9dd4ae1a7a Support cc_wrapper with MSVC toolchain
Bug: skia:
Change-Id: I0433105c4a0e064e5cc228b7f6bec1ef3c66909c
Reviewed-on: https://skia-review.googlesource.com/62744
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-23 16:34:29 +00:00
Jim Van Verth
ecfed2beaf Add iOS support for SkiaSDLExample.
Change-Id: Ib8f4d6c41356cf0fe2e14b7bff7713d107eaa01f
Reviewed-on: https://skia-review.googlesource.com/40687
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-08-30 18:56:46 +00:00
Mike Klein
c722f79b6c clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit

Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.

BUG=skia:2679

Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-31 18:39:23 +00:00
Mike Klein
263cef7b5f quote $windk to make copy-and-paste easy
Change-Id: Iaecae142dcf268517f8918d9f4fa6a64db194fab
Reviewed-on: https://skia-review.googlesource.com/23942
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-17 15:01:27 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Ethan Nicholas
762466e9fe Re-re-land sksl fragment processor support
This reverts commit 5ce3972055.

Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-29 14:57:47 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00