Commit Graph

99 Commits

Author SHA1 Message Date
Lazydodo
fc0f47e349 make.bat: Support running python from lib folder for make format
We are no longer depended on a system python being installed.
2019-08-13 17:03:09 -06:00
Lazydodo
64b092974c Cleanup/windows: Remove 32 bit support from make.bat helper script
This change removes 32 bit support from the helper make.bat scripts
as we are dropping official 32 bit support, you can still build for
32 bit by configuring your build yourself using cmake and pointing
the LIBDIR cmake variable to your own 32 bit library folder.
2019-08-05 10:31:51 -06:00
2d60a54649 Build: add config for developers
This has faster builds, error checks and tests. The number of cmake options
for this type of thing has grown over the years and it's convenient to be
able to point new developers to a single target.

Previously the combination of all these options did not work correctly, now
all tests should pass.

The easiest way to use this is with the make wrapper, for example:
make full developer debug

Or set it manually with CMake:
cmake -C ../blender/build_files/cmake/config/blender_developer.cmake .

Differential Revision: https://developer.blender.org/D5149
2019-08-05 15:25:36 +02:00
Lazydodo
9198ff4306 Cleanup/Win: Fix build folder name if no target is set
When you call make.bat without a target the build folder name would
have a double underscore in it which looked odd.
2019-08-02 08:25:18 -06:00
Lazydodo
8936479f76 Cleanup/Win: Remove unused game engine variables in build helper scripts 2019-08-02 08:19:04 -06:00
Ray Molenkamp
fb4ec706cd make.bat: Support optional paths for make format
make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

example:
make.bat format source/blender/blenkernel source/blender/gpu
2019-06-05 07:30:45 -06:00
Ray Molenkamp
079c7f918c Cleanup: make.bat remove noge option from help
The noge option has been removed but was still
shown in the help text.
2019-06-01 16:51:31 -06:00
Ray Molenkamp
893467a8e2 make.bat: Add convenience option to disable buildinfo
Optional parameter nobuildinfo turns WITH_BUILDINFO Off
which is helpful when doing development.
2019-06-01 16:49:21 -06:00
Ray Molenkamp
db3f3d4d23 make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.
2019-05-18 10:34:33 -06:00
Ray Molenkamp
164fafdcb0 make.bat: add option for enabling the OpenGL based tests. 2019-05-13 14:08:27 -06:00
Ray Molenkamp
33df4b78d0 make.bat: remove --expand-tabs from "make format" on windows.
following the change on linux.
2019-04-20 13:10:30 -06:00
Sergey Sharybin
2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
Campbell Barton
65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
Sergey Sharybin
fc32f98bbc Initial support of make format for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
Ray Molenkamp
1d2fc413c8 make.bat: Preliminary Visual Studio 2019 support.
VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre
2019-02-22 20:54:27 -07:00
Ray Molenkamp
633b77b0ee Make.bat: Fix sub-module detection 2019-02-22 20:53:29 -07:00
c5f13ecbc0 Merge branch 'blender2.7' 2019-02-17 15:57:34 +01:00
Ray Molenkamp
b428929319 Windows: Fix building with llvm/clang 7.0.1
For llvm 6 the visual studio integration was 'not great' and we had
our own, which broke when llvm 7.0.1 came out. llvm now has properly
supported integration available on the VS market place hence we can
retire our custom support.
2019-02-16 11:36:19 -07:00
Ray Molenkamp
e1efaa6f74 make.bat: remove stray quote in msvc2017 detection.
Shouldn't cause issues, but better safe than sorry.
2019-01-24 15:21:31 -07:00
c9df453ce7 Update for moving blender2.8 to master. 2018-12-21 12:15:21 +01:00
e72f989cf4 Update for moving master to blender2.7 branch. 2018-12-21 12:01:05 +01:00
Ray Molenkamp
ca30930e36 Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-30 17:39:20 -06:00
Ray Molenkamp
5490708c39 make.bat: fix unquoted variables.
causing build issues for some users.
2018-10-30 17:36:36 -06:00
Ray Molenkamp
2dbddaf3be Fix "make update" on Windows not updating addons to the blender2.8 branch.
based on rB8e183a83b7aa3bbdefcdea6a86ca2c0dbd00417f
2018-10-30 07:55:45 -06:00
Ray Molenkamp
4bf4da12de Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-22 10:19:06 -06:00
Ray Molenkamp
86dbbd156f Windows: Enable python debugging in Visual Studio.
see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

Differential Revision: https://developer.blender.org/D3817
2018-10-22 10:17:08 -06:00
Ines Almeida
38402e7fdd Remove last traces of game engine and blenderplayer 2018-09-22 15:54:30 +02:00
a4f2ebc78d Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3700
2018-09-19 18:18:05 +02:00
Ray Molenkamp
424839e3c2 make.bat: fix build error when there are spaces in the path to svn/git/cmake 2018-09-19 10:16:46 -06:00
Ray Molenkamp
5d034351de make.bat: fix ninja support.
only worked with a fresh build folder.
2018-08-14 07:59:08 -06:00
Ray Molenkamp
83227de828 make.bat : fix msvc 2017 detection.
when 2017 was not found, it did not properly bail out of the rest of the detection process unless verbose mode was used.
2018-07-29 11:24:49 -06:00
Ray Molenkamp
7232b0cbe5 make.bat : fix typo
pointed out by anchpop on irc.
2018-07-22 16:02:28 -06:00
Ray Molenkamp
51f14cfa43 make.bat : restore msvc2015 support.
broke when i removed the 2013 support.
2018-07-18 20:00:34 -06:00
Ray Molenkamp
41045478ab make.bat: remove msvc2013 support. 2018-07-17 14:44:47 -06:00
Ray Molenkamp
38b72fb64b make.bat: Fix msvc-2017 detection.
D3485 by @manung

Differential Revision: https://developer.blender.org/D3485
2018-06-18 13:39:12 -06:00
Ray Molenkamp
36e82b7759 make.bat: Fix make showhashes not working.
broke in recent refactor.
2018-06-16 12:29:38 -06:00
Ray Molenkamp
713027b832 make.bat : move all experimental options to their own section in the help. 2018-06-05 11:29:03 -06:00
Ray Molenkamp
983811607d make.bat : bring the help up to date with recent additions to the build script. 2018-06-05 10:40:14 -06:00
Ray Molenkamp
cd58ce85c2 make.bat : check for existence of ninja before using it. 2018-06-05 10:39:39 -06:00
Ray Molenkamp
5e44324b79 make.bat: change the way the vs buildtools are detected.
The recent change also used the buildtools instead of the regular compiler, you now have to explicitly state what you want to use :

2017 - the standard msvc compiler
2017pre - the msvc compiler from the preview installation
2017b - the msvc compiler from the buildtools installation
2018-06-05 10:38:48 -06:00
Ray Molenkamp
88b46a6ce9 make.bat : Fix clang+asan msbuild project generation 2018-06-04 22:35:57 -06:00
Ray Molenkamp
7c75c2db4f Add Asan support for clang on windows.
This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3446
2018-05-31 11:50:30 -06:00
Ray Molenkamp
c0f42a7526 make.bat: fix support for building with just the build tools installed. 2018-05-30 11:11:35 -06:00
Ray Molenkamp
c72a204001 make.bat : fix release build not getting the right settings. 2018-05-28 21:50:59 -06:00
Ray Molenkamp
9450792bf2 make.bat : add support for building with ninja and clang together. 2018-05-28 19:56:17 -06:00
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
Ray Molenkamp
7a0699db34 make.bat : Fix builtime.txt being written in the wrong folder. 2018-05-26 19:20:07 -06:00
Ray Molenkamp
c9db7ceff2 make.bat: Add support for building with ninja.
ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line.

Comparison between msbuild and ninja for a full build, build time in seconds.

Full Clean Build
msbuild     867.5
Ninja       801.2
Difference  -66.3 (-7.6%)

Minor Change
msbuild      43.0
Ninja        14.9
Difference  -28.1 (-64.4%)

No Changes
msbuild      23.0
Ninja         6.1
Difference  -16.9 (-73.5%)
2018-05-25 21:46:42 -06:00
Ray Molenkamp
857e4e04d8 make.bat: refactor make.bat
make.bat was starting to become hard to maintain, this refactors it into separate batch files for each stage of the process.

-Improved detection of msvc2013/2015
-Improved failure handling.
-Added check for working msbuild and C++ compiler
-Added verbose switch to ease trouble shooting.
-Added Check if svn/cmake/git are in the path before using them
-Display the build configuration before asking to download the libraries
-Offer an option to recover an interrupted checkout of the libraries.
-Automatically check out sub-modules in-case they are missing.
2018-05-25 17:57:13 -06:00