aboutsummaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authorBrian Salomon <bsalomon@google.com>2018-11-20 11:20:25 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-11-20 16:25:04 +0000
commit343063f3387b5c972c56fea614e31271f37c05e5 (patch)
treedd2689d59ff03cb4a62291df0fa2301cd0ec53ec /site
parent20e2fb2f9230b8e28e53a63423f67b2010a91826 (diff)
downloadskqp-343063f3387b5c972c56fea614e31271f37c05e5.tar.gz
Add docs about building with clang-cl on Windows.
No-Try: true Docs-Preview: https://skia.org/?cl=172061 Change-Id: I509ca82707324b49e3c439c0c07a8091ceaf374c Reviewed-on: https://skia-review.googlesource.com/c/172061 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'site')
-rw-r--r--site/user/build.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/site/user/build.md b/site/user/build.md
index eaf0f68b1c..31216fd24c 100644
--- a/site/user/build.md
+++ b/site/user/build.md
@@ -265,6 +265,19 @@ There is also a corresponding 2015 toolchain, downloaded via `infra/bots/assets/
The Skia build assumes that the PATHEXT environment variable contains ".EXE".
+### **Highly Recommended**: Build with clang-cl
+
+Skia uses generated code that is only optimized when Skia is built with clang. Other compilers get generic
+unoptimized code.
+
+Setting the `cc` and `cxx` gn args is _not_ sufficient to build with clang-cl. These variables
+are ignored on Windows. Instead set the variable `clang_win` to your LLVM installation directory.
+If you installed the prebuilt LLVM downloaded from [here](https://releases.llvm.org/download.html "LLVM Download") in the default location that would be:
+
+ clang_win = "C:\Program Files\LLVM"
+
+Follow the standard Windows path specification and not MinGW convention (e.g. `C:\Program Files\LLVM` not ~~`/c/Program Files/LLVM`~~).
+
### Visual Studio Solutions
If you use Visual Studio, you may want to pass `--ide=vs` to `bin/gn gen` to