[SERVER-48454] Ninja regeneration can drop the name of source files in windows Created: 27/May/20  Updated: 29/Oct/23  Resolved: 28/May/20

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.4.0-rc8, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Dev Platform 2020-06-01
Participants:

 Description   

On windows, SCons internally uses CHANGED_SOURCES in CCCOM and CXXCOM. In a situation where an object file already exists, this can expand to an empty list rather than the expected list of sources during ninja regeneration. This leads to unpleasant errors that look like this:

[1/3684] Compiling build\ninja\mongo\base\data_type_string_data.obj
FAILED: build/ninja/mongo/base/data_type_string_data.obj
cl @build\ninja\mongo\base\data_type_string_data.obj.rsp
cl : Command line error D8003 : missing source filename

The CHANGED_SOURCES facility exists to do batch compilation with MSVC, something we don't do. The idea is also incompatible with the idea of a build system generator, since the status of changed vs unchanged sources (with respect to the underlying object files) shouldn't affect the generated build.



 Comments   
Comment by Githook User [ 28/May/20 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-48454 Ignore [UN]CHANGED_[SOURCES|TARGETS] during ninja generation

(cherry picked from commit a7541c60e5904e7deafdedf5bb040cc8924ac7d3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/90143b2e20059a7714577f2dfa501ac2658ac3c2

Comment by Githook User [ 28/May/20 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-48454 Ignore [UN]CHANGED_[SOURCES|TARGETS] during ninja generation
Branch: master
https://github.com/mongodb/mongo/commit/a7541c60e5904e7deafdedf5bb040cc8924ac7d3

Generated at Thu Feb 08 05:17:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.