Fix mixed MSVC/clang-cl build (#1617)
Summary: An executable built by clang-cl that is linked against folly/logging from vcpkg will fail to link due to a few missing symbols. folly/logging has a number of functions that are only defined when `__INCLUDE_LEVEL__` is defined. vcpkg always uses MSVC, MSVC does not support this macro while clang-cl does, resulting in mismatch between what is defined, used, and declared. These ifdefs mostly came from fc507b26. The (minor IMO) negative consequence of this diff is that `XlogFileScopeInfo` will be unnecessarily larger (a pointer and an uint32) on compilers that don't support `__INCLUDE_LEVEL__` (e.g MSVC). The actual condition of whether to make use of `__INCLUDE_LEVEL__` remains, via the `XLOG_IS_IN_HEADER_FILE` macro. Pull Request resolved: https://github.com/facebook/folly/pull/1617 Reviewed By: yfeldblum Differential Revision: D29753787 Pulled By: Orvid fbshipit-source-id: 28f8128c981b255960d7838d2df2a3d299153bc2
Showing
Please register or sign in to comment