Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3134

Append wrapping driver platform data before CFLAGS and LDFLAGS

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.15.0
    • libmongoc

    Description

      PHPC-1378 presents a case where PHP platform information is getting cut off due to user-specified CFLAGS and LDFLAGS taking precedence in the handshake document (limited to 512 bytes). While PHP could avoid setting these constants in its own build configuration, that wouldn't apply to deployments where libmongoc is used as a system library. I would like to propose deferring CFLAG/LDFLAG appending until after the wrapping driver's own platform info.

      This would require some reordering of the handshake construction, given that the platform string is first initialized during _mongoc_handshake_init, which is likely before a wrapping driver would have a chance to call mongoc_handshake_data_append.

      Note: "posix", "stdc", and compiler info are also appended to the platform string before a wrapping driver's data; however, I'm not too concerned with those fields as their values should be short (unlike CFLAGS and LDFLAGS, which can easily exceed a handshake's size limit).

      Attachments

        Issue Links

          Activity

            People

              haris.sheikh@mongodb.com Haris Sheikh (Inactive)
              jmikola@mongodb.com Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: