Windows building: Should MSVC and Ninja builds produce identical binaries?

I have been doing some testing on the Cycles-X branch on Windows 10, which led me to doing some testing with different build systems. This has brought me to the question stated in the title above.

My (perhaps naive) assumption would be that with the same codebase, a build with Ninja and with standard MSVC would yield a bit-for-bit identical set of binaries. This assumption is based on my understanding of how Ninja works, which is to optimize the order of compilation units and reduce the time taken to resolve complex compilation dependencies.

However, what I am finding is this:

  1. (note latest versions of Ninja, Visual Studio, CUDA and Optix SDKs)
  2. I run CMake-GUI and select to use Ninja build system.
  3. I build with “make Ninja” and take MD5 hashes of blender.exe and the *.cubin and *.ptx files for render kernels.
  4. I delete my output folder entirely and re-run CMake-GUI and select to use Visual Studio 2019 generator.
  5. I build with “make 2019” and take MD5 hashes of blender.exe and the *.cubin and *.ptx files for render kernels.
  6. I find that all of the files have different hashes.

This can’t be expected behavior, can it? Since Ninja is still using the Visual C compiler toolchain, I would expect the same output.

Your assumption is wrong, at least for the blender executable, for quite a few reasons

  1. we embed the build time/date into the executable, so even on identical build systems you’ll have changes, you can turn that off (WITH_BUILDINFO in cmake) but other problems are afoot
  2. msvc sticks an undocumented block in the header of all executables with “things” which can cause issues as well
  3. on top of that msbuild and ninja may order the inputs to the linker slightly different leading to a different code layout in the final binary

So yeahh reproduceable builds are just not expected on windows (not even if you stick to msbuild), as for the cubin and ptx unsure what is happening there, but PTX is just a text file, should be easy to diff the two and see what changed between the two.

Thanks for the words of wisdom! I did not realize the linker order was different. This explains what I saw, since when I did a binary diff, there was a lot of changes beyond just the header section.

I did not realize PTX files were text (I just assumed they were binaries and never actually looked at them). I can definitely look into those.

The weird part is I am seeing functional differences between the build tools. When I build with Ninja, the Cycles-X branch renders take 5-7 seconds per frame saying “Updating Integrator” before the render starts. When I build with pure MSVC, that does not happen, so somehow the functionality is being affected. I have deleted and rebuilt both ways a few times now, and it’s definitely different.

sounds strange, if you have a repro case i’m happy to take a quick peek

Well, with the last few weeks of Cycles-X builds, I had noticed the “updating integrator” pause show up even on the default scene (when set to use OptiX rendering and with either OptiX or OIDN denoising). I have been using Ninja to build for over a year now, so I figured I’d try the MSVC path. The MSVC builds do not do this.

I can send a sample file, but frankly it happens with the default scene 100% for me on Ninja builds and never happens on pure MSVC builds. I’m struggling to find ways to better narrow down root cause. All my CMake settings are the same between the 2 test cases, short of the toolchain choice.

Perhaps a quick screen recording showing both scenarios would add value.

Not really, all that would prove is you are not a liar, you seem like a standup guy, and i’ll happily take your word that you are seeing the issue you are describing.

if the default cube does it that’s good enough for me, i’ll give it a quick shake.


ok not so quick, cycles-x is upset about my outdated versions of “the everything” i’ll have to circle back to this when i have a little bit more time on my hands

No rush. I have kept on digging though, as this has annoyed me deep in my brain. I ran file hashes of all the *.lib files between Ninja+MSVC and MSVC-only. To my shock, the lib files are radically different sizes so this seems like much more has changed than just section order within files. The Ninja+MSVC files tend to be much larger.

100,667,078 vs 249,891,084 for extern_mantaflow.lib
18,571,400 vs 123,998,928 for extern_quadriflow.lib

The lib sizes from MSVC-only:

CRC32 3c899736 bin\Release\blender.lib (3740 bytes)
CRC32 4a5754a4 bin\Release\3.0\python\lib\site-packages\numpy\core\lib\npymath.lib (261668 bytes)
CRC32 a9325198 bin\Release\3.0\python\lib\site-packages\numpy\random\lib\npyrandom.lib (154078 bytes)
CRC32 82e0c575 lib\Release\audaspace-py.lib (1952068 bytes)
CRC32 e3b08f03 lib\Release\audaspace.lib (10738428 bytes)
CRC32 81688078 lib\Release\bf_avi.lib (128176 bytes)
CRC32 f5078e89 lib\Release\bf_blenfont.lib (316946 bytes)
CRC32 14cc7275 lib\Release\bf_blenkernel.lib (142148926 bytes)
CRC32 f44db3cb lib\Release\bf_blenlib.lib (12090018 bytes)
CRC32 b7d717d9 lib\Release\bf_blenloader.lib (1922250 bytes)
CRC32 9bb6b3b1 lib\Release\bf_blentranslation.lib (43816 bytes)
CRC32 e7d41817 lib\Release\bf_bmesh.lib (4674956 bytes)
CRC32 23caca0b lib\Release\bf_collada.lib (14361434 bytes)
CRC32 80d68203 lib\Release\bf_compositor.lib (24040514 bytes)
CRC32 cc770c9d lib\Release\bf_depsgraph.lib (9063856 bytes)
CRC32 19ddf048 lib\Release\bf_dna.lib (392890 bytes)
CRC32 4570cefa lib\Release\bf_dna_blenlib.lib (315476 bytes)
CRC32 d7fdd7cf lib\Release\bf_draw.lib (8805904 bytes)
CRC32 f09680f1 lib\Release\bf_editor_animation.lib (1669394 bytes)
CRC32 7923075b lib\Release\bf_editor_armature.lib (1618044 bytes)
CRC32 60215464 lib\Release\bf_editor_asset.lib (472578 bytes)
CRC32 f4f385b6 lib\Release\bf_editor_curve.lib (954418 bytes)
CRC32 2eee422c lib\Release\bf_editor_datafiles.lib (4847596 bytes)
CRC32 d059da0c lib\Release\bf_editor_geometry.lib (24058 bytes)
CRC32 75cf4829 lib\Release\bf_editor_gizmo_library.lib (481298 bytes)
CRC32 6cca86a0 lib\Release\bf_editor_gpencil.lib (3048000 bytes)
CRC32 84a38c3a lib\Release\bf_editor_interface.lib (4789942 bytes)
CRC32 8e2207aa lib\Release\bf_editor_io.lib (267010 bytes)
CRC32 8f985e34 lib\Release\bf_editor_lattice.lib (122700 bytes)
CRC32 17fc45c8 lib\Release\bf_editor_mask.lib (494704 bytes)
CRC32 05251959 lib\Release\bf_editor_mesh.lib (3061850 bytes)
CRC32 06575a94 lib\Release\bf_editor_metaball.lib (100468 bytes)
CRC32 b736bfa8 lib\Release\bf_editor_object.lib (2824802 bytes)
CRC32 bf1e5118 lib\Release\bf_editor_physics.lib (871188 bytes)
CRC32 52f33c65 lib\Release\bf_editor_render.lib (473686 bytes)
CRC32 ceb58101 lib\Release\bf_editor_scene.lib (35906 bytes)
CRC32 35c3d398 lib\Release\bf_editor_screen.lib (1226820 bytes)
CRC32 55cad704 lib\Release\bf_editor_sculpt_paint.lib (4204658 bytes)
CRC32 2f06089e lib\Release\bf_editor_sound.lib (82736 bytes)
CRC32 1ad297ea lib\Release\bf_editor_space_action.lib (432558 bytes)
CRC32 7b585eb7 lib\Release\bf_editor_space_api.lib (29944 bytes)
CRC32 bd5d85b5 lib\Release\bf_editor_space_buttons.lib (236934 bytes)
CRC32 ace3a250 lib\Release\bf_editor_space_clip.lib (1196018 bytes)
CRC32 66d70fe1 lib\Release\bf_editor_space_console.lib (166952 bytes)
CRC32 077e1dff lib\Release\bf_editor_space_file.lib (857076 bytes)
CRC32 29295931 lib\Release\bf_editor_space_graph.lib (753734 bytes)
CRC32 2e07c461 lib\Release\bf_editor_space_image.lib (719230 bytes)
CRC32 113c7107 lib\Release\bf_editor_space_info.lib (245226 bytes)
CRC32 f373c867 lib\Release\bf_editor_space_nla.lib (505240 bytes)
CRC32 99521f17 lib\Release\bf_editor_space_node.lib (2216538 bytes)
CRC32 b55f5ecb lib\Release\bf_editor_space_outliner.lib (1825460 bytes)
CRC32 190bb694 lib\Release\bf_editor_space_script.lib (40608 bytes)
CRC32 856415dc lib\Release\bf_editor_space_sequencer.lib (943724 bytes)
CRC32 f6c94ffe lib\Release\bf_editor_space_spreadsheet.lib (1945046 bytes)
CRC32 27f41e30 lib\Release\bf_editor_space_statusbar.lib (20116 bytes)
CRC32 de7a2cef lib\Release\bf_editor_space_text.lib (911752 bytes)
CRC32 28d5e05a lib\Release\bf_editor_space_topbar.lib (29198 bytes)
CRC32 ae07ab0d lib\Release\bf_editor_space_userpref.lib (55878 bytes)
CRC32 2fc0d2ec lib\Release\bf_editor_space_view3d.lib (2252982 bytes)
CRC32 80770c26 lib\Release\bf_editor_transform.lib (2929548 bytes)
CRC32 6a42785f lib\Release\bf_editor_undo.lib (129656 bytes)
CRC32 8896fe55 lib\Release\bf_editor_util.lib (296216 bytes)
CRC32 c01c0557 lib\Release\bf_editor_uvedit.lib (1375340 bytes)
CRC32 8989fbd0 lib\Release\bf_functions.lib (1611502 bytes)
CRC32 2d225447 lib\Release\bf_gpencil.lib (920192 bytes)
CRC32 bb655f6c lib\Release\bf_gpencil_modifiers.lib (1155632 bytes)
CRC32 ecbc96c6 lib\Release\bf_gpu.lib (4709960 bytes)
CRC32 35d557a0 lib\Release\bf_ikplugin.lib (446552 bytes)
CRC32 0cfc0384 lib\Release\bf_imbuf.lib (1830624 bytes)
CRC32 f5c89306 lib\Release\bf_imbuf_cineon.lib (206706 bytes)
CRC32 93f31f82 lib\Release\bf_imbuf_dds.lib (430180 bytes)
CRC32 2b69a3ea lib\Release\bf_imbuf_openexr.lib (704302 bytes)
CRC32 3ac72803 lib\Release\bf_imbuf_openimageio.lib (249950 bytes)
CRC32 ad2c7a4e lib\Release\bf_intern_audaspace.lib (87546 bytes)
CRC32 b77e3ffb lib\Release\bf_intern_clog.lib (55346 bytes)
CRC32 baaef7c7 lib\Release\bf_intern_cycles.lib (12849670 bytes)
CRC32 426152a2 lib\Release\bf_intern_dualcon.lib (976974 bytes)
CRC32 3dc2a0ef lib\Release\bf_intern_eigen.lib (3400940 bytes)
CRC32 4484dcb9 lib\Release\bf_intern_ghost.lib (6001940 bytes)
CRC32 067065ca lib\Release\bf_intern_glew_mx.lib (8456 bytes)
CRC32 4a8e135b lib\Release\bf_intern_guardedalloc.lib (127210 bytes)
CRC32 7dbc4db2 lib\Release\bf_intern_iksolver.lib (4486350 bytes)
CRC32 b693441d lib\Release\bf_intern_itasc.lib (5930618 bytes)
CRC32 635ccb3b lib\Release\bf_intern_libmv.lib (56866 bytes)
CRC32 d24e91a9 lib\Release\bf_intern_locale.lib (196308 bytes)
CRC32 63476577 lib\Release\bf_intern_mantaflow.lib (2673948 bytes)
CRC32 95e16891 lib\Release\bf_intern_memutil.lib (93928 bytes)
CRC32 0a151b69 lib\Release\bf_intern_mikktspace.lib (102556 bytes)
CRC32 e0731ed7 lib\Release\bf_intern_numaapi.lib (30236 bytes)
CRC32 7bbcf8fa lib\Release\bf_intern_opencolorio.lib (764818 bytes)
CRC32 a8f30a9e lib\Release\bf_intern_opensubdiv.lib (1084836 bytes)
CRC32 6db56d8e lib\Release\bf_intern_openvdb.lib (123282 bytes)
CRC32 345bb50d lib\Release\bf_intern_quadriflow.lib (893122 bytes)
CRC32 ea6107be lib\Release\bf_intern_rigidbody.lib (552422 bytes)
CRC32 7dabb0a9 lib\Release\bf_intern_sky.lib (86002 bytes)
CRC32 09fbda55 lib\Release\bf_intern_utfconv.lib (47494 bytes)
CRC32 31056b1f lib\Release\bf_io_common.lib (1008186 bytes)
CRC32 75b68dfe lib\Release\bf_modifiers.lib (58987130 bytes)
CRC32 41da3611 lib\Release\bf_nodes.lib (66927744 bytes)
CRC32 1c8d913c lib\Release\bf_python.lib (1994004 bytes)
CRC32 b0889afc lib\Release\bf_python_bmesh.lib (789982 bytes)
CRC32 377b9e6b lib\Release\bf_python_ext.lib (1649154 bytes)
CRC32 6b42cd03 lib\Release\bf_python_gpu.lib (613158 bytes)
CRC32 64dfbc7b lib\Release\bf_python_mathutils.lib (1326346 bytes)
CRC32 faf4e452 lib\Release\bf_render.lib (876072 bytes)
CRC32 dc3fbaf6 lib\Release\bf_rna.lib (45134136 bytes)
CRC32 b496a91b lib\Release\bf_sequencer.lib (1376872 bytes)
CRC32 d79d437f lib\Release\bf_shader_fx.lib (152042 bytes)
CRC32 75a3e307 lib\Release\bf_simulation.lib (746810 bytes)
CRC32 c0d4a344 lib\Release\bf_usd.lib (15575768 bytes)
CRC32 7c9fd181 lib\Release\bf_windowmanager.lib (3206058 bytes)
CRC32 d73f2148 lib\Release\BlendThumb.lib (1570 bytes)
CRC32 5b4c8042 lib\Release\cycles_bvh.lib (2817298 bytes)
CRC32 8addb9e5 lib\Release\cycles_device.lib (5439138 bytes)
CRC32 bbc07765 lib\Release\cycles_graph.lib (986644 bytes)
CRC32 af275337 lib\Release\cycles_integrator.lib (4959940 bytes)
CRC32 a068d463 lib\Release\cycles_kernel.lib (19762602 bytes)
CRC32 9d62d1a4 lib\Release\cycles_render.lib (66065294 bytes)
CRC32 bf28254e lib\Release\cycles_subd.lib (898394 bytes)
CRC32 9cf50934 lib\Release\cycles_util.lib (2111144 bytes)
CRC32 d993499d lib\Release\draco.lib (21312048 bytes)
CRC32 a747caf7 lib\Release\extern_bullet.lib (14245100 bytes)
CRC32 41e5d6ab lib\Release\extern_clew.lib (75858 bytes)
CRC32 c1555a96 lib\Release\extern_cuew.lib (186556 bytes)
CRC32 361e1ea4 lib\Release\extern_curve_fit_nd.lib (285110 bytes)
CRC32 b2cff148 lib\Release\extern_draco.lib (6946 bytes)
CRC32 77c9164d lib\Release\extern_gflags.lib (1590400 bytes)
CRC32 0844d094 lib\Release\extern_glew.lib (2092990 bytes)
CRC32 e6c1fcd9 lib\Release\extern_glog.lib (1235952 bytes)
CRC32 c33d8e6d lib\Release\extern_lzma.lib (312298 bytes)
CRC32 637f8d76 lib\Release\extern_mantaflow.lib (100667078 bytes)
CRC32 8b27f8a2 lib\Release\extern_minilzo.lib (37556 bytes)
CRC32 20b00387 lib\Release\extern_quadriflow.lib (18571400 bytes)
CRC32 521c0b8d lib\Release\extern_rangetree.lib (35828 bytes)
CRC32 57b2fd3d lib\Release\extern_wcwidth.lib (9988 bytes)
CRC32 c3dea429 source\creator\buildinfoobj.dir\Release\buildinfoobj.lib (3604 bytes)

The lib sizes from Ninja+MSVC:

CRC32 3c899736 bin\blender.lib (3740 bytes)
CRC32 4a5754a4 bin\3.0\python\lib\site-packages\numpy\core\lib\npymath.lib (261668 bytes)
CRC32 a9325198 bin\3.0\python\lib\site-packages\numpy\random\lib\npyrandom.lib (154078 bytes)
CRC32 48f83ebb lib\audaspace-py.lib (5110962 bytes)
CRC32 5d0d5aa3 lib\audaspace.lib (34415264 bytes)
CRC32 5839e57e lib\bf_avi.lib (190336 bytes)
CRC32 b8d71d17 lib\bf_blenfont.lib (377848 bytes)
CRC32 5d106caa lib\bf_blenkernel.lib (482712404 bytes)
CRC32 43e24f5f lib\bf_blenlib.lib (28719274 bytes)
CRC32 0483e237 lib\bf_blenloader.lib (3965812 bytes)
CRC32 a79eddaa lib\bf_blentranslation.lib (56314 bytes)
CRC32 d1863e71 lib\bf_bmesh.lib (7610846 bytes)
CRC32 e2b61aaa lib\bf_collada.lib (74173928 bytes)
CRC32 a4bacb78 lib\bf_compositor.lib (125197698 bytes)
CRC32 56d8f689 lib\bf_depsgraph.lib (38895216 bytes)
CRC32 e04eaed8 lib\bf_dna.lib (602858 bytes)
CRC32 7c8fc908 lib\bf_dna_blenlib.lib (288236 bytes)
CRC32 fc8f42c8 lib\bf_draw.lib (24024736 bytes)
CRC32 0b3d8610 lib\bf_editor_animation.lib (3336690 bytes)
CRC32 97657cad lib\bf_editor_armature.lib (3635930 bytes)
CRC32 3f9655c8 lib\bf_editor_asset.lib (2033808 bytes)
CRC32 bbd84d42 lib\bf_editor_curve.lib (1626834 bytes)
CRC32 3821799c lib\bf_editor_datafiles.lib (4953948 bytes)
CRC32 9b6388e5 lib\bf_editor_geometry.lib (73006 bytes)
CRC32 64f258a9 lib\bf_editor_gizmo_library.lib (1428170 bytes)
CRC32 1ca7bd7c lib\bf_editor_gpencil.lib (6131872 bytes)
CRC32 ce96b7df lib\bf_editor_interface.lib (9333098 bytes)
CRC32 8d130299 lib\bf_editor_io.lib (846984 bytes)
CRC32 0bc72e9b lib\bf_editor_lattice.lib (438112 bytes)
CRC32 1a98ba24 lib\bf_editor_mask.lib (1119810 bytes)
CRC32 3f8c13c0 lib\bf_editor_mesh.lib (5732984 bytes)
CRC32 0e4f190e lib\bf_editor_metaball.lib (322056 bytes)
CRC32 14edc030 lib\bf_editor_object.lib (5104698 bytes)
CRC32 abcd8c22 lib\bf_editor_physics.lib (1621282 bytes)
CRC32 65a20392 lib\bf_editor_render.lib (1196526 bytes)
CRC32 f9c28c30 lib\bf_editor_scene.lib (125694 bytes)
CRC32 18de37cf lib\bf_editor_screen.lib (2290714 bytes)
CRC32 17e3e67e lib\bf_editor_sculpt_paint.lib (8963660 bytes)
CRC32 b3fae44a lib\bf_editor_sound.lib (157902 bytes)
CRC32 edb2f765 lib\bf_editor_space_action.lib (1023408 bytes)
CRC32 33ebed0c lib\bf_editor_space_api.lib (119764 bytes)
CRC32 54c8753f lib\bf_editor_space_buttons.lib (780546 bytes)
CRC32 7fa1225f lib\bf_editor_space_clip.lib (2954970 bytes)
CRC32 ab7dbce6 lib\bf_editor_space_console.lib (358454 bytes)
CRC32 13a8b93f lib\bf_editor_space_file.lib (1534662 bytes)
CRC32 b825123d lib\bf_editor_space_graph.lib (1544198 bytes)
CRC32 f08ed589 lib\bf_editor_space_image.lib (1364916 bytes)
CRC32 e0da1624 lib\bf_editor_space_info.lib (718552 bytes)
CRC32 4404785b lib\bf_editor_space_nla.lib (1150438 bytes)
CRC32 3f892d74 lib\bf_editor_space_node.lib (6280540 bytes)
CRC32 37f02296 lib\bf_editor_space_outliner.lib (4966222 bytes)
CRC32 d0c21e5c lib\bf_editor_space_script.lib (232632 bytes)
CRC32 1a6c4d47 lib\bf_editor_space_sequencer.lib (1825518 bytes)
CRC32 e6ceb192 lib\bf_editor_space_spreadsheet.lib (9521234 bytes)
CRC32 8904c4d5 lib\bf_editor_space_statusbar.lib (112310 bytes)
CRC32 a3d85ec9 lib\bf_editor_space_text.lib (1335784 bytes)
CRC32 0f0047fc lib\bf_editor_space_topbar.lib (147106 bytes)
CRC32 862f665c lib\bf_editor_space_userpref.lib (180698 bytes)
CRC32 a0bf811d lib\bf_editor_space_view3d.lib (5384722 bytes)
CRC32 c9d16db3 lib\bf_editor_transform.lib (9926816 bytes)
CRC32 3aa2caea lib\bf_editor_undo.lib (350746 bytes)
CRC32 bc5300e8 lib\bf_editor_util.lib (1034232 bytes)
CRC32 9ba23fea lib\bf_editor_uvedit.lib (2157696 bytes)
CRC32 f540a46b lib\bf_functions.lib (5403512 bytes)
CRC32 c7060bef lib\bf_gpencil.lib (3201048 bytes)
CRC32 bee2b2e7 lib\bf_gpencil_modifiers.lib (4166782 bytes)
CRC32 0e9b7d99 lib\bf_gpu.lib (15257926 bytes)
CRC32 fa0e3b41 lib\bf_ikplugin.lib (1625252 bytes)
CRC32 3315c778 lib\bf_imbuf.lib (2133796 bytes)
CRC32 3abc4200 lib\bf_imbuf_cineon.lib (216930 bytes)
CRC32 3c945aef lib\bf_imbuf_dds.lib (845362 bytes)
CRC32 31d1eca3 lib\bf_imbuf_openexr.lib (2159282 bytes)
CRC32 886d16aa lib\bf_imbuf_openimageio.lib (1017974 bytes)
CRC32 94ec384c lib\bf_intern_audaspace.lib (418806 bytes)
CRC32 15b577ca lib\bf_intern_clog.lib (64606 bytes)
CRC32 1ae4ce0b lib\bf_intern_cycles.lib (76133898 bytes)
CRC32 6bdcfb36 lib\bf_intern_dualcon.lib (8124618 bytes)
CRC32 cee27d8e lib\bf_intern_eigen.lib (30391592 bytes)
CRC32 9411f02e lib\bf_intern_ghost.lib (21391806 bytes)
CRC32 d32fc236 lib\bf_intern_glew_mx.lib (10856 bytes)
CRC32 fc8a0e15 lib\bf_intern_guardedalloc.lib (139672 bytes)
CRC32 1bd79d14 lib\bf_intern_iksolver.lib (50382284 bytes)
CRC32 ef83cf44 lib\bf_intern_itasc.lib (41109778 bytes)
CRC32 3e2bfe0d lib\bf_intern_libmv.lib (83228 bytes)
CRC32 099d39a9 lib\bf_intern_locale.lib (681314 bytes)
CRC32 f6cff8d3 lib\bf_intern_mantaflow.lib (4201430 bytes)
CRC32 7143b06f lib\bf_intern_memutil.lib (618206 bytes)
CRC32 039d6fda lib\bf_intern_mikktspace.lib (108254 bytes)
CRC32 95310284 lib\bf_intern_numaapi.lib (41544 bytes)
CRC32 86d7866b lib\bf_intern_opencolorio.lib (2174312 bytes)
CRC32 05d97c97 lib\bf_intern_opensubdiv.lib (5983860 bytes)
CRC32 8ce45cf0 lib\bf_intern_openvdb.lib (720024 bytes)
CRC32 8893ea7b lib\bf_intern_quadriflow.lib (4712328 bytes)
CRC32 5f485548 lib\bf_intern_rigidbody.lib (1742654 bytes)
CRC32 e991f74c lib\bf_intern_sky.lib (111186 bytes)
CRC32 35cf6a82 lib\bf_intern_utfconv.lib (56492 bytes)
CRC32 a408e34d lib\bf_io_common.lib (5186902 bytes)
CRC32 c7d56eed lib\bf_modifiers.lib (222393214 bytes)
CRC32 210124b4 lib\bf_nodes.lib (286344300 bytes)
CRC32 56e91520 lib\bf_python.lib (2873710 bytes)
CRC32 e95e7416 lib\bf_python_bmesh.lib (817908 bytes)
CRC32 6b178a94 lib\bf_python_ext.lib (1055744 bytes)
CRC32 fbe273d9 lib\bf_python_gpu.lib (789200 bytes)
CRC32 884b4105 lib\bf_python_mathutils.lib (1261826 bytes)
CRC32 cf237cb3 lib\bf_render.lib (1536178 bytes)
CRC32 4afecb51 lib\bf_rna.lib (46600528 bytes)
CRC32 c1183b31 lib\bf_sequencer.lib (2426892 bytes)
CRC32 eb435530 lib\bf_shader_fx.lib (996270 bytes)
CRC32 f4cdb7cf lib\bf_simulation.lib (4461512 bytes)
CRC32 9e1304ce lib\bf_usd.lib (90055498 bytes)
CRC32 c12ff777 lib\bf_windowmanager.lib (6194396 bytes)
CRC32 d73f2148 lib\BlendThumb.lib (1570 bytes)
CRC32 7311e7cc lib\cycles_bvh.lib (13229082 bytes)
CRC32 53dd2a95 lib\cycles_device.lib (21969254 bytes)
CRC32 a1c85ae1 lib\cycles_graph.lib (4114000 bytes)
CRC32 021503c8 lib\cycles_integrator.lib (19563902 bytes)
CRC32 7eef1cd5 lib\cycles_kernel.lib (21281016 bytes)
CRC32 83bcc004 lib\cycles_render.lib (259769950 bytes)
CRC32 db245767 lib\cycles_subd.lib (4439748 bytes)
CRC32 c733d535 lib\cycles_util.lib (8236964 bytes)
CRC32 226f63d0 lib\draco.lib (101449968 bytes)
CRC32 18ef18ef lib\extern_bullet.lib (41364054 bytes)
CRC32 5f50e51a lib\extern_clew.lib (56448 bytes)
CRC32 dbbda343 lib\extern_cuew.lib (157666 bytes)
CRC32 c742d688 lib\extern_curve_fit_nd.lib (224344 bytes)
CRC32 b2cff148 lib\extern_draco.lib (6946 bytes)
CRC32 c69f4003 lib\extern_gflags.lib (4640172 bytes)
CRC32 d9049e5c lib\extern_glew.lib (1613500 bytes)
CRC32 c31ce920 lib\extern_glog.lib (3469770 bytes)
CRC32 226a5ecd lib\extern_lzma.lib (349584 bytes)
CRC32 c646b91a lib\extern_mantaflow.lib (249891084 bytes)
CRC32 32470fff lib\extern_minilzo.lib (39398 bytes)
CRC32 06b066e4 lib\extern_quadriflow.lib (123998928 bytes)
CRC32 935b77df lib\extern_rangetree.lib (48616 bytes)
CRC32 03d74764 lib\extern_wcwidth.lib (10284 bytes)

picked only one of them, but it seems like one of them is embedding more symbol information than the other, it’s likely a flag somewhere that msbuild is setting by default while cmake doesn’t pass it to ninja

Give this a whirl:

diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index d44ef691d1b..e3183fe5b7f 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -151,8 +151,8 @@ if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
   string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
   set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
-  string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj")
-  set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
+  string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj /Zc:inline")
+  set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj /Zc:inline")

 # X64 ASAN is available and usable on MSVC 16.9 preview 4 and up)

I still haven’t sorted out my outdated optix/cuda installs, but this should bring the libraries to near identical sizes, wonder how much it’ll do for you 5-7 second “Updating Integrator” issue.

Fun reading material on this flag on the cmake bug tracker

1 Like

Fixed in master, cycles-x merges master on a regular basis so should be available there soonish as well, i’m not expecting this to change anything for your actual issue but have still not reproduced it so can’t say for sure.

1 Like

Sorry for the late replies - I just finished some initial testing, and the updating integrator message is still there. At this point I have even deleted my whole C:\BlenderSource folder and re-fetched all the libs and the source, so I think my build environment is pretty clean. Plus, I have removed and reinstalled all the CUDA and OptiX SDKs as well.

Interestingly, though, the binaries size is still drastically larger on the Ninja side, even after applying the diff you posted, so it looks like those build arguments are still not being utilized.

Probably not worth me wasting any more of your time, to be honest. At this point, I’m inclined to kick ninja to the curb and just do a good old “build 2019”.