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

Separate build_mode out into individual components

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • Fully Compatible

      In SCons we have separate command line parameters for the various settings build_mode is configuring (opt, release, dbg). In bazel, these are combined into one flag.

      The way it's setup now it's error prone to use these as conditions in Bazel since usually the compiler options depend on the individual configuration, not the combined configuration.

      For example in https://github.com/10gen/mongo/commit/6e7cace87c2464b8bad409a83236edd8cbd3f0ec#diff-5cc16064f5f3b761a339bbacf36b99d1cc1a5fed12d21a06ac573372d4fe0588 the /MD vs /MDd option is only concerned with the dbg flag, not the opt or release flag. In the current implementation, it's tied to the settings of all three.

      Combining options also caused https://jira.mongodb.org/browse/SERVER-86687 since build_mode gets set to "dbg" even though the sanitizers specifically need to query the opt-mode (opt=debug or opt=on)

      Separate these out to match the original SCons flags and instead create .bazelrc config options to capture common configurations.

            Assignee:
            zack.winter@mongodb.com Zack Winter
            Reporter:
            zack.winter@mongodb.com Zack Winter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: