From f294a25c99cb7ca908c3ecf9e2c39dd617046b33 Mon Sep 17 00:00:00 2001 From: Naman Ahuja Date: Wed, 29 May 2024 12:54:21 -0700 Subject: [PATCH 1/2] 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 --- shim/shims.bzl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shim/shims.bzl b/shim/shims.bzl index 6b893004e..97c57611e 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: From 68384f8bbef3720802ebf2f57a3fbe179d3e69cf Mon Sep 17 00:00:00 2001 From: Naman Ahuja Date: Wed, 29 May 2024 12:54:21 -0700 Subject: [PATCH 2/2] Add necessary third party libs Summary: These are necessary to buck build fizz Reviewed By: bigfootjon Differential Revision: D57915931 --- shim/third-party/brotli/BUCK | 22 ++++++++++++++++++++++ shim/third-party/jvm/BUCK | 15 +++++++++++++++ shim/third-party/libaegis/BUCK | 15 +++++++++++++++ shim/third-party/liboqs/BUCK | 15 +++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 shim/third-party/brotli/BUCK create mode 100644 shim/third-party/jvm/BUCK create mode 100644 shim/third-party/libaegis/BUCK create mode 100644 shim/third-party/liboqs/BUCK diff --git a/shim/third-party/brotli/BUCK b/shim/third-party/brotli/BUCK new file mode 100644 index 000000000..95ebd06aa --- /dev/null +++ b/shim/third-party/brotli/BUCK @@ -0,0 +1,22 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +load("@shim//third-party:third_party.bzl", "third_party_library") + +oncall("open_source") + +third_party_library( + name = "brotlidec", + homebrew_package_name = "brotli", + pkgconfig_name = "libbrotlidec", +) + +third_party_library( + name = "brotlienc", + homebrew_package_name = "brotli", + pkgconfig_name = "libbrotlienc", +) diff --git a/shim/third-party/jvm/BUCK b/shim/third-party/jvm/BUCK new file mode 100644 index 000000000..9de6e20cf --- /dev/null +++ b/shim/third-party/jvm/BUCK @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +load("@shim//third-party:third_party.bzl", "third_party_library") + +oncall("open_source") + +third_party_library( + name = "jvm", + homebrew_package_name = "openjdk", +) diff --git a/shim/third-party/libaegis/BUCK b/shim/third-party/libaegis/BUCK new file mode 100644 index 000000000..8ac657a17 --- /dev/null +++ b/shim/third-party/libaegis/BUCK @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +load("@shim//third-party:third_party.bzl", "third_party_library") + +oncall("open_source") + +third_party_library( + name = "aegis", + pkgconfig_name = "libaegis", +) diff --git a/shim/third-party/liboqs/BUCK b/shim/third-party/liboqs/BUCK new file mode 100644 index 000000000..c56ee2512 --- /dev/null +++ b/shim/third-party/liboqs/BUCK @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under both the MIT license found in the +# LICENSE-MIT file in the root directory of this source tree and the Apache +# License, Version 2.0 found in the LICENSE-APACHE file in the root directory +# of this source tree. + +load("@shim//third-party:third_party.bzl", "third_party_library") + +oncall("open_source") + +third_party_library( + name = "oqs", + pkgconfig_name = "liboqs", +)