TooManyCooks icon indicating copy to clipboard operation
TooManyCooks copied to clipboard

ABI stability w/ different compile-time configuration parameters

Open tzcnt opened this issue 8 months ago • 0 comments

Currently if a 3rd party library wants to depend on TooManyCooks, and that library is shipped with a compiled binary, it would have to be compiled against the same configuration parameters as the version of TooManyCooks that the consuming application is building with. These configuration parameters may be ABI-breaking:

  • TMC_TRIVIAL_TASK (removes special member functions)
  • TMC_USE_HWLOC (introduces new member fields)
  • NDEBUG (introduces new member fields, and ODR-violations due to use of assert() in inline / template methods)
  • TMC_PRIORITY_COUNT (removes member fields)
  • TMC_WORK_ITEM (changes public method APIs)

Most of these could be solved by some careful changes, or by simply removing the config option - however TMC_WORK_ITEM is one where I don't feel comfortable doing this. The difference in performance between the work item types can be quite significant. At the moment I doubt anyone is trying to ship compiled binaries that depend on TMC so this is an issue to be resolved at a later date.

For now, my recommendation is to simply compile all libraries that use TMC as part of the same project with the same configuration parameters.

tzcnt avatar Apr 27 '25 18:04 tzcnt