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

Create custom bazel build rules for each target type (ex. "mongo_cc_library") to allow adding mongo-specific settings

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible

    Description

      Bazel doesn’t provide any way to propagate certain build rule variables across many targets automatically.

      The current issue is, if we want to set `copts= “-Isrc”` for all targets under the /src/ directory, we would have to set it in every single target manually.

      Since we likely are going to need to add other custom settings beyond copts, create a custom build target for each target type (lib, cc, etc) that every other build rule can depend on where we can add custom mongo settings, like copts.

      See https://docs.google.com/document/d/1e2A1M8yjSTwxOtEB9As1XwfjSuUlmiXVSQFfl3b_FaU/edit

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: