diff options
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 |