From 343063f3387b5c972c56fea614e31271f37c05e5 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 20 Nov 2018 11:20:25 -0500 Subject: 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 Reviewed-by: Mike Klein Reviewed-by: Brian Osman --- site/user/build.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'site') 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 -- cgit v1.2.3