Skip to content

Commit

Permalink
Update deps paths
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/ocamlrep#81

Update the deps resolution path in BUCK depending on ```oss_depends_on``` in ```.buckconfig```

Reviewed By: bigfootjon

Differential Revision: D57915321
  • Loading branch information
namanahuja authored and facebook-github-bot committed May 29, 2024
1 parent 365861e commit eddf3dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shim/shims.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit eddf3dc

Please sign in to comment.