Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48454

Ninja regeneration can drop the name of source files in windows

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc8, 4.7.0
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Dev Platform 2020-06-01

      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.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: