Blender Git Commit Log

Git Commits -> Revision ac4eec8

June 1, 2018, 13:41 (GMT)
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

Commit Details:

Full Hash: ac4eec8cb9c6e85860577e02456643a5c543ecf9
Parent Commit: dac0b7c
Committed By: Erik Englesson
Lines Changed: +151, -18

1 Added Path:

/extern/Eigen3/patches/blender.diff (+12, -0) (View)

19 Modified Paths:

/build_files/build_environment/patches/boost.diff (+22, -0) (Diff)
/build_files/build_environment/patches/osl.diff (+26, -0) (Diff)
/build_files/cmake/platform/platform_win32.cmake (+14, -3) (Diff)
/build_files/windows/configure_msbuild.cmd (+4, -0) (Diff)
/build_files/windows/configure_ninja.cmd (+6, -0) (Diff)
/build_files/windows/parse_arguments.cmd (+3, -0) (Diff)
/build_files/windows/reset_variables.cmd (+1, -0) (Diff)
/CMakeLists.txt (+6, -1) (Diff)
/extern/bullet2/patches/blender.patch (+31, -0) (Diff)
/extern/bullet2/src/LinearMath/btScalar.h (+5, -2) (Diff)
/extern/Eigen3/Eigen/src/Core/arch/SSE/PacketMath.h (+1, -1) (Diff)
/intern/atomic/intern/atomic_ops_msvc.h (+10, -1) (Diff)
/intern/cycles/CMakeLists.txt (+2, -2) (Diff)
/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+2, -2) (Diff)
/source/blender/blenlib/BLI_utildefines.h (+2, -2) (Diff)
/source/blender/bmesh/CMakeLists.txt (+1, -1) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -1) (Diff)
/source/blender/python/intern/stubs.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021