Make building with clang documentation a bit easier to find

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1495913002

Review URL: https://codereview.chromium.org/1495913002
This commit is contained in:
kjlubick 2015-12-03 09:20:55 -08:00 committed by Commit bot
parent 7ea439b220
commit 222b30d3a8
3 changed files with 16 additions and 3 deletions

View File

@ -32,7 +32,8 @@ Gyp Options
Skia relies on Gyp to generate build files. Read about
[specifying options for Gyp](/user/tips#gypdefines) to set the
compile-time settings, compiler, build systems, and build directory.
compile-time settings, compiler (e.g. use clang instead of gcc), build systems,
and build directory.
Run unit and correctness tests
------------------------------

View File

@ -81,6 +81,8 @@ Notes
<!--?prettify lang=sh?-->
GYP_DEFINES='skia_arch_type=x86' python bin/sync-and-gyp
2. By default, many Linux systems use gcc by default. To use clang you will
need to [set the CC and CXX environment variables](/user/tips#gypdefines).
Generate build files
--------------------

View File

@ -20,14 +20,24 @@ Note: Setting enviroment variables in the Windows CMD.EXE shell [uses a
different syntax](/user/quick/windows#env).
You can also set environment variables such as `CC`, `CXX`,
`CFLAGS`, or `CPPFLAGS` to control how Skia is compiled. For
example:
`CFLAGS`, `CXXFLAGS`, or `CPPFLAGS` to control how Skia is compiled.
To build with clang, for example:
<!--?prettify lang=sh?-->
CC='clang' CXX='clang++' python bin/sync-and-gyp
ninja -C out/Debug
To build with clang and enable a compiler warning for unused parameters in C++
(but not C or assembly) code:
<!--?prettify lang=sh?-->
CXXFLAGS='-Wunused-parameter'
CC='clang' CXX='clang++' python bin/sync-and-gyp
ninja -C out/Debug
The `GYP_GENERATORS` environment variable can be used to set the
build systems that you want to use (as a comma-separated list).
The default is `'ninja,msvs-ninja'` on Windows, `'ninja,xcode'` on