Skip to content

Commit

Permalink
Fill in third-party dependencies for folly
Browse files Browse the repository at this point in the history
Summary:
I found these by repeatedly running `dotslash-oss ./buck2 targets ...` in the GitHub version of folly after fixing all the non-third-party dependencies (see previous diff).

This works by querying `pkg-config` for the correct pre-processor/linker flags to pass to `cc` for a package installed on the system (by homebrew or whatever).

Reviewed By: namanahuja

Differential Revision: D57384136

fbshipit-source-id: 385218aba98e332bfeea7af7fa2bd53bc194cb8e
  • Loading branch information
bigfootjon authored and facebook-github-bot committed May 21, 2024
1 parent fc22004 commit 1fecaf8
Show file tree
Hide file tree
Showing 25 changed files with 487 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shim/third-party/binutils/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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 = "iberty",
)
34 changes: 34 additions & 0 deletions shim/third-party/boost/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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")
load("@shim//third-party/boost:boost.bzl", "boost_libs")

oncall("open_source")

boost_libs([
"container",
"range",
"thread",
"algorithm",
"regex",
"program_options",
"filesystem",
"multi_index",
"context",
"variant",
"lexical_cast",
"random",
"sort",
"interprocess",
])

# Empty target to satisfy some build rules:
third_party_library(
name = "boost_preprocessor",
homebrew_package_name = "boost",
)
20 changes: 20 additions & 0 deletions shim/third-party/boost/boost.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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")

def boost_libs(xs):
third_party_library(
name = "boost",
homebrew_package_name = "boost",
)
for x in xs:
third_party_library(
name = "boost_{}".format(x),
homebrew_package_name = "boost",
homebrew_linker_flags = ["-lboost_{}".format(x)],
)
15 changes: 15 additions & 0 deletions shim/third-party/bzip2/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "bz2",
homebrew_package_name = "bzip2",
)
16 changes: 16 additions & 0 deletions shim/third-party/double_conversion/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 = "double_conversion",
homebrew_linker_flags = ["-ldouble-conversion"],
homebrew_package_name = "double-conversion",
)
15 changes: 15 additions & 0 deletions shim/third-party/fmt/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "fmt",
pkgconfig_name = "fmt",
)
15 changes: 15 additions & 0 deletions shim/third-party/gflags/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "gflags",
pkgconfig_name = "gflags",
)
36 changes: 36 additions & 0 deletions shim/third-party/glibc/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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//build_defs:prebuilt_cpp_library.bzl", "prebuilt_cpp_library")

oncall("open_source")

prebuilt_cpp_library(name = "glibc")

alias(
name = "rt",
actual = ":glibc",
visibility = ["PUBLIC"],
)

alias(
name = "ct",
actual = ":glibc",
visibility = ["PUBLIC"],
)

alias(
name = "dl",
actual = ":glibc",
visibility = ["PUBLIC"],
)

alias(
name = "pthread",
actual = ":glibc",
visibility = ["PUBLIC"],
)
16 changes: 16 additions & 0 deletions shim/third-party/glog/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 = "glog",
pkgconfig_name = "libglog",
deps = ["//third-party/gflags:gflags"],
)
22 changes: 22 additions & 0 deletions shim/third-party/googletest/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "gtest",
homebrew_package_name = "googletest",
pkgconfig_name = "GTest",
)

alias(
name = "gmock",
actual = ":gtest",
visibility = ["PUBLIC"],
)
16 changes: 16 additions & 0 deletions shim/third-party/jemalloc/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 = "headers",
homebrew_package_name = "jemalloc",
pkgconfig_name = "jemalloc",
)
15 changes: 15 additions & 0 deletions shim/third-party/libaio/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "aio",
homebrew_package_name = "libaio",
)
16 changes: 16 additions & 0 deletions shim/third-party/libdwarf/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 = "dwarf",
homebrew_package_name = "libdwarf",
pkgconfig_name = "libdwarf",
)
15 changes: 15 additions & 0 deletions shim/third-party/libevent/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "libevent",
pkgconfig_name = "libevent",
)
15 changes: 15 additions & 0 deletions shim/third-party/libgcc/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "stdc++fs",
homebrew_package_name = "gcc",
)
16 changes: 16 additions & 0 deletions shim/third-party/libsodium/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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 = "sodium",
homebrew_package_name = "libsodium",
pkgconfig_name = "libsodium",
)
15 changes: 15 additions & 0 deletions shim/third-party/lz4/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "lz4",
pkgconfig_name = "liblz4",
)
22 changes: 22 additions & 0 deletions shim/third-party/openssl/BUCK
Original file line number Diff line number Diff line change
@@ -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 = "ssl",
homebrew_package_name = "openssl",
pkgconfig_name = "openssl",
)

alias(
name = "crypto",
actual = ":ssl",
visibility = ["PUBLIC"],
)
17 changes: 17 additions & 0 deletions shim/third-party/python/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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 = "python",
homebrew_header_path = "Frameworks/Python.framework/Headers",
homebrew_package_name = "python3",
pkgconfig_name = "python3",
)
12 changes: 12 additions & 0 deletions shim/third-party/range-v3/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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 = "range-v3")
12 changes: 12 additions & 0 deletions shim/third-party/snappy/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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 = "snappy")
Loading

0 comments on commit 1fecaf8

Please sign in to comment.