From 870c753a14b003b036e411ee7fc90593857604d9 Mon Sep 17 00:00:00 2001 From: Naman Ahuja Date: Wed, 29 May 2024 15:11:18 -0700 Subject: [PATCH] Update deps paths Summary: X-link: https://github.com/facebook/ocamlrep/pull/81 Update the deps resolution path in BUCK depending on ```oss_depends_on``` in ```.buckconfig``` Reviewed By: bigfootjon Differential Revision: D57915321 fbshipit-source-id: 9e073e4a24f75a793dec96371718593d68bf6be6 --- shim/shims.bzl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shim/shims.bzl b/shim/shims.bzl index 6b893004eb..97c57611eb 100644 --- a/shim/shims.bzl +++ b/shim/shims.bzl @@ -135,6 +135,7 @@ def cpp_library( exported_linker_flags = None, headers = None, private_headers = None, + propagated_pp_flags = (), **kwargs): _unused = (undefined_symbols, arch_preprocessor_flags, modular_headers, arch_compiler_flags, tags) # @unused if os_deps: @@ -415,9 +416,14 @@ def _fix_dep(x: str) -> [ elif x.startswith("third-party//"): return "shim//third-party/" + x.removeprefix("third-party//") elif x.startswith("//folly"): + oss_depends_on_folly = read_config("oss_depends_on", "folly", False) + if oss_depends_on_folly: + return "root//folly/" + x.removeprefix("//") return "root//" + x.removeprefix("//") elif x.startswith("root//folly"): return x + elif x.startswith("//fizz"): + return "root//" + x.removeprefix("//") elif x.startswith("shim//"): return x else: