blender/intern
Ray Molenkamp 81060ff6b2 Windows: Add support for building with clang.
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
	msvc:3099.51
	clang:2796.43

pavillon_barcelona_cpu
	msvc:1872.05
	clang:1827.72

koro_cpu
	msvc:1097.58
	clang:1006.51

fishy_cat_cpu
	msvc:815.37
	clang:722.2

classroom_cpu
	msvc:1705.39
	clang:1575.43

bmw27_cpu
	msvc:552.38
	clang:561.53

barbershop_interior_cpu
	msvc:2134.93
	clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3304
2018-05-28 14:34:47 -06:00
..
atomic Windows: Add support for building with clang. 2018-05-28 14:34:47 -06:00
audaspace PyDocs: Fix link syntax 2018-03-22 16:38:53 -04:00
clog Logging: add --show-log-backtrace 2018-05-18 11:00:47 +02:00
container Remove SCons building system 2016-01-04 14:20:48 +05:00
cycles Windows: Add support for building with clang. 2018-05-28 14:34:47 -06:00
decklink Cleanup: code style & cmake 2017-03-12 02:47:53 +11:00
dualcon Remove MinGW support 2017-05-27 15:34:55 -04:00
eigen Fix compilation error with clang-5 2017-11-14 17:11:48 +01:00
elbeem Cleanup: add _types.h suffix to DNA headers 2018-02-07 11:14:08 +11:00
ffmpeg Fix building with latest versions of ffmpeg. 2018-05-08 16:00:52 +02:00
ghost Fix wrong comparison of drop target URI on X11 2018-05-07 14:11:33 +02:00
glew-mx Remove SCons building system 2016-01-04 14:20:48 +05:00
gpudirect Cleanup: comment blocks 2016-07-02 10:08:33 +10:00
guardedalloc Fix incorrect size in aligned lockfree realloc 2018-05-23 07:24:57 +02:00
iksolver FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries. 2016-11-15 13:21:01 -07:00
itasc Added extra "const" to satisfy the strict clang version in Xcode 9 2017-09-20 21:47:45 +02:00
libmv Libmv: Fix compilation error on Windows 2018-03-23 15:05:08 +01:00
locale Add C internal version of msgfmt (similar to makesrna/dna binaries). 2017-04-24 10:49:54 +02:00
memutil Cleanup: doxygen comments 2017-06-19 10:04:30 +10:00
mikktspace Mikktspace: Speed up the merging of identical vertices 2017-11-17 18:34:53 +01:00
moto BGE: Various render improvements. 2016-06-11 22:05:20 +02:00
opencolorio Remove MinGW support 2017-05-27 15:34:55 -04:00
opensubdiv Update CUEW to latest version 2018-02-07 11:53:01 +01:00
openvdb Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option. 2018-04-02 19:13:04 +02:00
rigidbody Use the newer version of the bullet 6dof spring constraint for rigidbody. 2018-04-09 19:14:35 +03:00
smoke Smoke: Pass non-trivial arguments by const reference 2017-11-14 17:11:48 +01:00
string Drop platform support for Solaris & AIX 2017-09-29 19:16:34 +10:00
utfconv C++ conformance fixes (MSVC /permissive-) 2017-02-06 10:44:56 +01:00
CMakeLists.txt C Logging: use instead of printf for messages 2018-03-30 18:57:41 +02:00