Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Allows `folly/logging:logging` to be imported as a C++20 header unit (module) in dependant targets that use header units (`use_header_units=True`). This does not impact any other target, including `logging` itself. Right now, no target uses modules yet, so this change should do nothing, unless you request to build the module explicitly (`[header-unit]` subtarget). Caveat: `xlog.h` can be modularised, but the anonymous namespace trick used to implement `XLOG_SET_CATEGORY_NAME` does not work if the library is imported as a header unit (or any kind of C++ module, in fact). Eventually, I think we should phase out the usage of `XLOG_SET_CATEGORY_NAME` inside fbcode, as it seems very seldom used: fbgs returns one instance. (T204728450) On the other hand, the same anonymous namespace trick means that `xlog.h` must be modularised if we want to use it in any other module (i.e. if we want to turn any header which includes `xlog.h` into its own module), since the anonymous namespace cannot be duplicated. Reviewed By: dmpolukhin Differential Revision: D64400928 fbshipit-source-id: 16929a082a4c362817c57511aedadb1693686401
- Loading branch information