diff --git a/shim/shims.bzl b/shim/shims.bzl index 81f15113ff9..d9c0081af99 100644 --- a/shim/shims.bzl +++ b/shim/shims.bzl @@ -142,6 +142,10 @@ def cpp_library( deps += _select_os_deps(_fix_dict_deps(os_deps)) if headers == None: headers = [] + if tags != None and "oss_dependency" in tags: + oss_depends_on_folly = read_config("oss_depends_on", "folly", False) + if oss_depends_on_folly: + headers = [item.replace("//:", "//folly:") if item == "//:folly-config.h" else item for item in headers] if is_select(srcs) and auto_headers == AutoHeaders.SOURCES: # Validate `srcs` and `auto_headers` before the config check base_path = native.package_name()