aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
Commit message (Collapse)AuthorAge
* Add the ability to use different mallocs.Gravatar Herb Derby2016-12-09
| | | | | | | | | | | | | gn gen --args='malloc="tcmalloc"' gn gen --args='malloc="jemalloc"' or if the library is in a non-standard directory gn gen --args='malloc="tcmalloc" extra_ldflags="-L<path-to-library>"' Change-Id: Icacd837d11392a1971f298ccddd69a5a6781f6cf Reviewed-on: https://skia-review.googlesource.com/5629 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* On mips64el, use -B instead of linking .o manually.Gravatar Mike Klein2016-12-08
| | | | | | | | | | | These .o are only appropriate for linking executables; others would be used if we link an .so. -B turns out to be the flag we really wanted here anyway, adding that directory to the search path for all these .o files, letting Clang pick the right one. The existing comment is now correct for both the lib_dirs and ldflags +=. Change-Id: I66d9aada12477756142726828cf66c142ca76a48 Reviewed-on: https://skia-review.googlesource.com/5657 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* -pie applies only to executablesGravatar Mike Klein2016-12-06
| | | | | | | Change-Id: I36dff113145befbfb4f69810a474394d5d0ca4ed Reviewed-on: https://skia-review.googlesource.com/5553 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Use /MD for Windows builds."Gravatar Joe Gregorio2016-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cab79aadad30e48fc7b4ba9868d6badf3798beba. Reason for revert: Bots crashing. Original change's description: > Use /MD for Windows builds. > > I think the default is /MT, static linking. > This should make our builds smaller, and compatible with clients using /MD. > > Change-Id: Id8a39a029925eda2627532bbd0223c693300f5da > Reviewed-on: https://skia-review.googlesource.com/5277 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,bungeman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iff644250a23175e44a4282e7aaea0e2a2adc1ce0 Reviewed-on: https://skia-review.googlesource.com/5310 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Use /MD for Windows builds.Gravatar Mike Klein2016-11-29
| | | | | | | | | | I think the default is /MT, static linking. This should make our builds smaller, and compatible with clients using /MD. Change-Id: Id8a39a029925eda2627532bbd0223c693300f5da Reviewed-on: https://skia-review.googlesource.com/5277 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Turn off /arch:AVX[2] on Windows builds."Gravatar Mike Klein2016-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c89e2438ae24c862087f8ca1cb076052edbb27ea. Reason for revert: I'm going to stub this code out in Chrome instead for now. Chrome's not going to land something that looks like this, so I'd rather undo it than leave Skia in this odd state. Original change's description: > Turn off /arch:AVX[2] on Windows builds. > > This canaries a similar change Chrome may need. > > BUG=chromium:666707 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005 > > Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175 > Reviewed-on: https://skia-review.googlesource.com/5005 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,brucedawson@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I9562f7877749c61f6ba4d48d6c4b557f09876128 Reviewed-on: https://skia-review.googlesource.com/5069 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Turn off /arch:AVX[2] on Windows builds.Gravatar Mike Klein2016-11-18
| | | | | | | | | | | | | This canaries a similar change Chrome may need. BUG=chromium:666707 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005 Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175 Reviewed-on: https://skia-review.googlesource.com/5005 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: add public headers warnings check.Gravatar Mike Klein2016-11-16
| | | | | | | | | | | | We already generate skia.h to include all public headers for Fiddle. This just includes it with -Wunused-parameter turned on as an error. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4901 Change-Id: Ia55a901c09a3c9c9d6d35a43259431dba3532ed9 Reviewed-on: https://skia-review.googlesource.com/4901 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: detect is_clang cheaply when possible.Gravatar Mike Klein2016-11-14
| | | | | | | | | | | | | | | | | | | | Running is_clang.py is the current long-poll in `gn gen` time. We can avoid it trivially in a few situations: - We always use Clang on Android, iOS, and Mac. - If cc and cxx are clang and clang++, it's Clang. This cuts `gn gen` time from 80ms to 20ms on my laptop. (Did you know gn has a --tracelog=trace.log option for creating Chrome-tracing-compatible traces? Pretty neat.) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4746 Change-Id: Ic81d221675e8309cc9942bb9e62243d86658b02d Reviewed-on: https://skia-review.googlesource.com/4746 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
* Add GN iOS builder.Gravatar Mike Klein2016-11-07
| | | | | | | | | | | This gets up a bot to build for iOS via GN as much as we can right now. This is unlikely to be the long term structure of the iOS bots... by the time we add Test/Perf bots we'll likely need to have a gn_ios_flavor.py. But for now, this keeps the GN iOS build such as it is working. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4457 Change-Id: Ideb10ae3f4ab5530ad153237a343dd5c0e7dd02f Reviewed-on: https://skia-review.googlesource.com/4457 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com>
* GN: quiet alink spam on MacGravatar Mike Klein2016-11-07
| | | | | | | | | | | | | | | When building on Mac you see lots of spam about object files with no symbols when linking libskia.a. This filters them out. We have to do this in a Python script anyway, so I've consolidated into the existing gn/ar.py. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4447 Change-Id: I9b18051ba687ec1fcf464a87a8a5929d29c70f24 Reviewed-on: https://skia-review.googlesource.com/4447 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: quiet link.exe warning spam.Gravatar Mike Klein2016-11-07
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4448 Change-Id: Iabc76cf111a62783770725a6cbf3a4284f35502b Reviewed-on: https://skia-review.googlesource.com/4448 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: iOS basicsGravatar Mike Klein2016-11-03
| | | | | | | | | | | | | | | This doesn't create any apps or bundles or sign anything, but it all compiles and links. Note the awkward transitional hack I used to make each tool's tool_main() serve as the real main() again when built with GN, while keeping the existing setup with GYP. Fun... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4350 Change-Id: I632753d5d8e5848380854f413bf5905d676bfcf4 Reviewed-on: https://skia-review.googlesource.com/4350 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* For debug builds, -O0 by default, adding -O1 only on bots.Gravatar Mike Klein2016-11-02
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4344 Change-Id: Idc1435d75e51ea0b54d369efa91993d369aa74c0 Reviewed-on: https://skia-review.googlesource.com/4344 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: spin off :no_exceptions as its own config.Gravatar Mike Klein2016-10-26
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4001 Change-Id: Ibaa10b9b6f566958b7e6622eedbc30a7010260b3 Reviewed-on: https://skia-review.googlesource.com/4001 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Turn on -Wrange-loop-analysis.Gravatar Mike Klein2016-10-26
| | | | | | | | | | | | | | -Wrange-loop-analysis triggers when we use a new-style for loop in a way that appears to unintentionally call a copy constructor on each non-trivial loop element instead of operating on them by reference. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4000 Change-Id: If9e1b7fcc1f2789ae03c41c17abb17e60d564a8b Reviewed-on: https://skia-review.googlesource.com/4000 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Build for Android from Windows, work in progress.Gravatar Mike Klein2016-10-26
| | | | | | | | | | | | | | | | | Pretty vanilla stuff here, mostly just making the gcc-like toolchain Windows friendly. I was having trouble getting rm -r {{output}} && $ar rcs {{output}} @$rspfile to work without deleting my ar.exe, so I chickened out the usual way by adding gn/ar.py. I've also updated bin/droid to work with Git Bash on Windows. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3751 Change-Id: I04c34ccc91e6a291c11ac4e7a7a0ffe41d879fe6 Reviewed-on: https://skia-review.googlesource.com/3751 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Turn off buffer security checking in Release builds.Gravatar Mike Klein2016-10-20
| | | | | | | | | | | | | I'm seeing /GS's _security_check_cookie() show up as a signficant piece of time when profiling. That's mostly just annoying noise. We generally use our Release builds for performance testing and Debug for correctness, so it seems like a fair thing to disable in Release builds... it's a sort of ASAN thing, which we only do in Debug on other platforms. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3782 Change-Id: I9b3cf4c5cf943fc2549f5bf91a1f6f7e41733e2c Reviewed-on: https://skia-review.googlesource.com/3782 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
* Turn on /OPT:REF and /OPT:ICF too.Gravatar Mike Klein2016-10-20
| | | | | | | | | | | | | These two together shave another 5MB off dm.exe, from 16MB -> 11MB. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3738 Change-Id: Id216867e0ad5bc115fbd4006095860dff9204947 Reviewed-on: https://skia-review.googlesource.com/3738 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
* Compile for Windows with /Zc:inline.Gravatar Mike Klein2016-10-20
| | | | | | | | | | | | | | | By default, MSVC generates standalone versions of all functions, including static inline functions that are only inlined. Those standalone versions are dead code. This /Zc:inline flag makes MSVC behave like all the other compilers, omitting those standalone functions. Chrome builds with this flag. This CL cuts dm.exe and nanobench.exe each down by about 3MB, 19->16MB for DM and 15MB->12MB for nanobench. This shouldn't affect runtime speed, and didn't signficantly change clean build time on my Z840 (~90s either way). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3735 Change-Id: Ibd2a80337fcefc3f4eaf4335ea4e95a80bb4fddb Reviewed-on: https://skia-review.googlesource.com/3735 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
* Compile Release builds with -momit-leaf-frame-pointer.Gravatar Mike Klein2016-10-20
| | | | | | | | | | | | | | | | Unlike -fomit-frame-pointer, this doesn't make debugging or profiling any more difficult, as it only applies to leaves. It will make our code (negligibly) smaller and (negligibly) faster. Mostly I just find it easier to read the disassembly without all the rbp gymnastics getting in the way. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3700 Change-Id: I4b96aee7619791d5980de7f46e82836ca08a6456 Reviewed-on: https://skia-review.googlesource.com/3700 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Viewer on Mac.Gravatar Mike Klein2016-10-20
| | | | | | | | | | | | | | | | | - Support ObjC / ObjC++ - Build SDL on Mac. - Build viewer on Mac. Patched from Jim's CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3760 Change-Id: I12663f2ed2969e22f51aefed560fbc22b2524167 Reviewed-on: https://skia-review.googlesource.com/3760 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Switch Windows ANGLE bots to GN.Gravatar Mike Klein2016-10-17
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-ANGLE-Trybot;master.client.skia:Test-Win-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3539 Change-Id: I076c4c5972344b6688d648a8ea5e5618e87fd88d Reviewed-on: https://skia-review.googlesource.com/3539 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* GN: get Angle compiling on Windows.Gravatar Mike Klein2016-10-17
| | | | | | | | | | | | | | | | | | Angle does not yet link, but it does compile. I chickened out and wrote cp.py to be the copy tool on Windows. I've got all platforms using it for consistency. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-ANGLE-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3533 Change-Id: I15f4b63a47121528b2fd2672c26c62765966147c Reviewed-on: https://skia-review.googlesource.com/3533 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make GCC ninja log lines consistent with MSVC.Gravatar Mike Klein2016-10-17
| | | | | | | | | | | | | I recently switched over MSVC to simpler log lines from Ninja. This makes GCC- or Clang-based builds use the same set of messages. It's less noise when things go right; Ninja prints the whole line when a step fails. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3540 Change-Id: I36b638ee180210c6fb35c2bccb1b6d3c58437d36 Reviewed-on: https://skia-review.googlesource.com/3540 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN/Win: quieter buildsGravatar Mike Klein2016-10-13
| | | | | | | | | | | | It's hard to read the logs as they are now. This simplifies down the descriptions, and stifles a warning about linking object files with no symbols into a static library. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3322 Change-Id: I52beb3b8405ebb2c370cad432669834b64baa840 Reviewed-on: https://skia-review.googlesource.com/3322 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN/Win: pass /DEBUG to linker to get debug symbols.Gravatar Mike Klein2016-10-13
| | | | | | | | | | | | | Not much used for debug symbols if they're not linked in. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3320 Change-Id: I506ae624ec412d4151a025879a5dd14d90183bd8 Reviewed-on: https://skia-review.googlesource.com/3320 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN/Win: warnings and warn-as-errorGravatar Mike Klein2016-10-13
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3258 Change-Id: Ia2b85904bed1e6ca72c68abaecf6c2854795342c Reviewed-on: https://skia-review.googlesource.com/3258 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: naive attempt for 32-bit Windows supportGravatar Mike Klein2016-10-13
| | | | | | | | | | | | | | This uses the win_toolchain's SetEnv.cmd script to set up the environment for x86 builds. Some of what it sets is redundant with what we set: include_dirs (INCLUDE), lib_dirs (LIB). I'd sort of like to learn what parts of it actually matter: VSINSTALLDIR? VCINSTALLDIR? likely PATH? This will not work for local builds not using win_toolchain. I don't mind that too much, at least for now, maybe forever. Most humans should be using 64-bit builds. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86-Debug-Exceptions-Trybot,Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3257 Change-Id: Ib880fb738bc4b493e8905903706526110213be47 Reviewed-on: https://skia-review.googlesource.com/3257 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: windows flags tweaks.Gravatar Mike Klein2016-10-12
| | | | | | | | | | | | | | Should be no need for /TC, /TP. Don't set GCC-like 32-bit build flags on Windows. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3256 Change-Id: Ifa11606ca55a86d416724247328024ddea59e8bc Reviewed-on: https://skia-review.googlesource.com/3256 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN/Win: flesh out compiler flags.Gravatar Mike Klein2016-10-12
| | | | | | | | | | | | | | | | | This should turn on the basics: optimization, debug symbols, disabled RTTI. Release builds compile monobench, and cl.exe isn't happy with 1.0/0.0 there, so I swapped that into infinity(). Also, gn format I skipped last time. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot,Build-Win-MSVC-x86_64-Release-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3252 Change-Id: I8718d583e3fba4496b789eb25971462b972a5425 Reviewed-on: https://skia-review.googlesource.com/3252 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN/Win: support win_toolchain asset?Gravatar Mike Klein2016-10-12
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Win-MSVC-x86_64-Debug-GN-Trybot GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3246 Change-Id: Ib38d4f16788bc27ad81975a4c1b0a732e5df1de3 Reviewed-on: https://skia-review.googlesource.com/3246 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* More steps toward GN/Windows.Gravatar Mike Klein2016-10-11
| | | | | | | | | | | I think I'm now at the point of needing to just resolve missing symbols. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3201 Change-Id: Ib908bd72c23f2d4bafd17182eedcb2fc85c422e5 Reviewed-on: https://skia-review.googlesource.com/3201 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: windows compiles locally.Gravatar Mike Klein2016-10-11
| | | | | | | | | | | Not yet linking. Ignoring bots for now. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3200 Change-Id: Idd75033313df60844c2ba602f7845b3c52987bc2 Reviewed-on: https://skia-review.googlesource.com/3200 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make `gn gen` work on Windows again.Gravatar Mike Klein2016-10-11
| | | | | | | | | | | | | | Clang detection is specific to GCC-like toolchains. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3171 Change-Id: I7144bc8e5cd3e774625b51a6dda981284ed1fdc1 Reviewed-on: https://skia-review.googlesource.com/3171 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Update to Android NDK r13.Gravatar Mike Klein2016-10-11
| | | | | | | | | | | | | | | | | | | The libc++ include paths have changed very slightly. I've left GN compatible with both older r12 NDKs and the new r13 to smooth the transition. The libc++ in r13 depends on long-double math.h functions (cosl, atanl, etc.) only available in Android API v21 (Lollipop) and up. That's what the 64-bit bots were already on, so we just pull the 32-bit bots up to the same target. Conveniently, the oldest bots we have (N7 and N10) are on Lollipop. The r13 MIPS64 sysroots are a little weird... /usr/include and /usr/lib64 but no /usr/lib. That'd be fine---we only want 64-bit builds---but Clang searches for /usr/lib64 via its path to /usr/lib, and without at least an empty /usr/lib, it can't find /usr/lib64. So you'll see a special mips64el section in the GN config where we do this all manually (other platforms pick this all up correctly from --sysroot). I've chosen to do this rather than fix it up in the asset create.py scripts so that we stay compatible with vanilla NDKs, which is convenient for developers. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Mac-Clang-arm64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm-Release-GN_Android-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs-Trybot,Build-Ubuntu-Clang-arm64-Debug-GN_Android_Vulkan-Trybot,Build-Ubuntu-Clang-arm64-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mips64el-Release-GN_Android-Trybot,Build-Ubuntu-Clang-mipsel-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-mipsel-Release-GN_Android-Trybot,Build-Ubuntu-Clang-x64-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-x64-Release-GN_Android-Trybot,Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot,Build-Ubuntu-Clang-x86-Release-GN_Android-Trybot BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3180 Change-Id: I6f3b5d9411ded0ee49c1099490f41fa86a8736f8 Reviewed-on: https://skia-review.googlesource.com/3180 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fold extra_*_flags into GN as a config.Gravatar Mike Klein2016-10-04
| | | | | | | | | | | | | | This should make them visible to things like gn_to_cmake.py. I'm not exactly sure what this implies about ordering and overriding. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2938 Change-Id: I0740613993fb5bbfb8363cfa126d1f59768abf60 Reviewed-on: https://skia-review.googlesource.com/2938 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Turn on -Wgnu-anonymous-struct and -Wnested-anonymous-types.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | I'm not seeing any problems with these locally. Perhaps the bots have something to say. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2709 Change-Id: I6f0c7045c8f270efcd71d837f22a40e9f9d3e9b7 Reviewed-on: https://skia-review.googlesource.com/2709 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Turn on -Wnewline-eof.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | I don't know _why_ Clang would like these .inc files to have a newline at the end of the file, but it seems a harmless way to silence the warning. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2711 Change-Id: I6c530ee5096c48c91ddf322aca916e70a0dd770b Reviewed-on: https://skia-review.googlesource.com/2711 Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* We really shouldn't pass SkFontStyle to printf as %d.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2721 Change-Id: I362063bea3909b2581d8e9b7860d4ac321082808 Reviewed-on: https://skia-review.googlesource.com/2721 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Remove stray semicolons.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | | | | Turns out function declarations don't end in semicolons... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720 No public API changes. TBR=reed@google.com Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb Reviewed-on: https://skia-review.googlesource.com/2720 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Focus -Wno-over-aligned to just 32-bit x86 Android. (2)Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | | | I've even found the code that's making this happen, just don't know why. I've added a test to assert that it's safe to assume malloc() is 8-byte aligned. Test should compile this time. CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot Change-Id: I48714b99670c20704adf4f7f216da0d60d7d9bcd Reviewed-on: https://skia-review.googlesource.com/2662 Reviewed-on: https://skia-review.googlesource.com/2703 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Focus -Wno-over-aligned to just 32-bit x86 Android."Gravatar Mike Reed2016-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit If8a2898ab3a77571622eb125c97f676e029b902c. Reason for revert: ../../../../../work/skia/tests/OverAlignedTest.cpp: In function 'void test_OverAligned(skiatest::Reporter*, sk_gpu_test::GrContextFactory*)': ../../../../../work/skia/tests/OverAlignedTest.cpp:19:33: error: invalid operands of types 'void*' and 'int' to binary 'operator&' REPORTER_ASSERT(r, SkIsAlign8(p)); ^ ninja: build stopped: subcommand failed. Original issue's description: > Focus -Wno-over-aligned to just 32-bit x86 Android. > > I've even found the code that's making this happen, just don't know why. > I've added a test to assert that it's safe to assume malloc() is 8-byte aligned. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2662 > > CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot > TBR=mtklein@chromium.org,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic9b30ce980d8d5155528a6f2b4e1913e5fa95dc0 Reviewed-on: https://skia-review.googlesource.com/2702 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Focus -Wno-over-aligned to just 32-bit x86 Android.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | | | | I've even found the code that's making this happen, just don't know why. I've added a test to assert that it's safe to assume malloc() is 8-byte aligned. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2662 CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-GN_Android-Trybot Change-Id: If8a2898ab3a77571622eb125c97f676e029b902c Reviewed-on: https://skia-review.googlesource.com/2662 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Move undefined-func-template to wont-fix warnings.Gravatar Mike Klein2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | The warning looks to helpfully pre-warn about possible link failures, but it's warning exclusively in places where we're doing things right. The worst that happens ignoring this warning is a missing-symbol linker error. I've taken the opportunity to batch in a few other de-escalations: - Wconditional-uninitialized is done better by MSAN - It'll take some work to dig Wformat-literal out of our shader compiler, but nothing looks unsafe - Most of Wshift-sign-overflow is 0xff << 24. Don't want to ban that. - Wdeprecated is mostly warning about features C++11 technically deprecated that might be removed in later releases. Punt! - Wcovered-switch-default is pretty much the opposite of what we want. - Wshadow is triggering too often to fix quickly. Probably mostly false positives. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2620 Change-Id: I20a85a77d2e19ed05a536b23037bd988350f821e Reviewed-on: https://skia-review.googlesource.com/2620 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Turn on -Wundefined-reinterpret-cast.Gravatar Mike Klein2016-09-26
| | | | | | | | | | | | | | | | | It was not a fan of this (blatant) aliasing. I suspect this best_non_simd_srcover_srgb_srgb() function has several other aliasing issues that use undefined behavior, but this is all it's complaining about for now. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2606 Change-Id: I25a8800e810bccf5068c8a10e9c8c8f565e57304 Reviewed-on: https://skia-review.googlesource.com/2606 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* -Wcomma may be good to go now.Gravatar Mike Klein2016-09-26
| | | | | | | | | | | | | This cleans up 3 remaining sites using , that probably meant ; BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2605 Change-Id: I5e48bcd85d72a205d2b0c860461dab1ec793dd18 Reviewed-on: https://skia-review.googlesource.com/2605 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: detect is_clang, use it to switch Clang to warning blacklist.Gravatar mtklein2016-09-26
| | | | | | | | | | | | | | | Same as the last CL, now with -Wno-over-aligned. CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369033002 TBR=bungeman@google.com NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2369033002
* Revert "GN: detect is_clang, use it to switch Clang to warning blacklist."Gravatar Mike Klein2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I09c3487adfeb26a6fb07e1939cb927c5d7de3107. Reason for revert: -Wover-aligned on x86 Android bots Original issue's description: > GN: detect is_clang, use it to switch Clang to warning blacklist. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2599 > > Change-Id: I09c3487adfeb26a6fb07e1939cb927c5d7de3107 > Reviewed-on: https://skia-review.googlesource.com/2599 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,bungeman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic07bf7896a305be6c377f14a573cb10836f1a6f8 Reviewed-on: https://skia-review.googlesource.com/2601 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* GN: detect is_clang, use it to switch Clang to warning blacklist.Gravatar Mike Klein2016-09-26
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2599 Change-Id: I09c3487adfeb26a6fb07e1939cb927c5d7de3107 Reviewed-on: https://skia-review.googlesource.com/2599 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>