Avoid Linux-specific dependency for macOS builds
Summary: In Facebook's Buck-based build system, folly/system/MemoryMapping.cpp depends on folly/experimental/io/HugePages.cpp. This works well on Linux, and in theory works well on macOS because HugePages.cpp has no OS-specific code at build time. However, because HugePages.cpp has a transitive dependency on the range-v3 library, and because range-v3 isn't available in Facebook's build system for macOS yet, building HugePages.cpp on macOS fails. On macOS, avoid MemoryMapping.cpp's dependency on HugePages.cpp (and thus the transitive dependency on range-v3). Use a manual annotation to prevent the Facebook's autodeps tool from forcing the dependency on macOS in Buck. (It looks like autodeps does not interpret `#ifdef __linux__`.) On Linux (servers), this diff should not change behavior. This diff does not fix the issue in folly's CMake build system. Reviewed By: yfeldblum Differential Revision: D15775751 fbshipit-source-id: 612790caab673c0fc52eb3054aa5789f767c7353
Showing
Please register or sign in to comment