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

Refactor sha_block_{crypto} libraries into a loop

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Build
    • Fully Compatible

      aaron.mondal@mongodb.com's suggestion of a loop would cleanup the logic in src/mongo/crypto/BUILD.bazel quite a bit, ex:

      [
          mongo_cc_library(
              name = "sha_block_{}".format(xxx),
              srcs = ["sha_block_{}.cpp".format(xxx)],
              header_deps = ["//src/mongo/db/concurrency:flow_control_ticketholder"],
              target_compatible_with = ..., # Surely we can capture this as well somehow.
              local_defines = ["LTC_NO_PROTOTYPES"] if xxx == "tom" else [],
              deps = [
                  ":sha1_block",
                  ":sha256_block",
                  "//src/mongo:base",
              ],
          )
          for xxx in ["windows", "apple", ...]
      ]
      

      We should be able to come up with a target_compatible_with flag too, but it might take a bit of thinking on how exactly to do it

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

              Created:
              Updated:
              Resolved: