diff options
author | kjlubick <kjlubick@google.com> | 2015-12-03 09:20:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-03 09:20:55 -0800 |
commit | 222b30d3a84b29b72b32e639751db4e6542d5e48 (patch) | |
tree | f844bdc13311b50d890aaeecfbaa92eea486a650 /site/user | |
parent | 7ea439b2203855db97330b25945b87dd4b170b8b (diff) |
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
Diffstat (limited to 'site/user')
-rw-r--r-- | site/user/quick/desktop.md | 3 | ||||
-rw-r--r-- | site/user/quick/linux.md | 2 | ||||
-rw-r--r-- | site/user/tips.md | 14 |
3 files changed, 16 insertions, 3 deletions
diff --git a/site/user/quick/desktop.md b/site/user/quick/desktop.md index 88e31d72ad..c3d6df0fbe 100644 --- a/site/user/quick/desktop.md +++ b/site/user/quick/desktop.md @@ -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 ------------------------------ diff --git a/site/user/quick/linux.md b/site/user/quick/linux.md index 5e47df2998..be723efbfd 100644 --- a/site/user/quick/linux.md +++ b/site/user/quick/linux.md @@ -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 -------------------- diff --git a/site/user/tips.md b/site/user/tips.md index ed701792dd..967146f504 100644 --- a/site/user/tips.md +++ b/site/user/tips.md @@ -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 |