Skip to content

Commit

Permalink
Merge branch 'main' into darwin48v_platform_3
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcalabrigo authored Nov 27, 2024
2 parents e59c03e + 4d395c4 commit 7ff0020
Show file tree
Hide file tree
Showing 1,024 changed files with 113,822 additions and 21,299 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ gh_facebook_buck2_shims_meta = git

[external_cell_gh_facebook_buck2_shims_meta]
git_origin = https://github.com/facebook/buck2-shims-meta.git
commit_hash = 461a1b10af7eb8af2f6d0eb0129009d60048e6de
commit_hash = 8fc88930320931d4ebe35f2b588dce4c95384d20
28 changes: 27 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ find_package(fizz CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(wangle CONFIG REQUIRED)
find_package(FBThrift CONFIG REQUIRED)
find_package(range-v3 REQUIRED)
include_directories(${FB303_INCLUDE_DIR})
find_path(FATAL_INCLUDE_DIR NAMES fatal/portability.h)
include_directories(${FATAL_INCLUDE_DIR})
Expand Down Expand Up @@ -382,6 +383,27 @@ add_fbthrift_cpp_library(
phy_cpp2
transceiver_cpp2
)
add_fbthrift_cpp_library(
cmis_cpp2
fboss/qsfp_service/module/cmis/cmis.thrift
OPTIONS
json
reflection
)
add_fbthrift_cpp_library(
sff_cpp2
fboss/qsfp_service/module/sff/sff.thrift
OPTIONS
json
reflection
)
add_fbthrift_cpp_library(
sff8472_cpp2
fboss/qsfp_service/module/sff/sff8472.thrift
OPTIONS
json
reflection
)
add_fbthrift_cpp_library(
sensor_service_stats_cpp2
fboss/platform/sensor_service/sensor_service_stats.thrift
Expand Down Expand Up @@ -703,6 +725,10 @@ find_library(LIBGPIOD gpiod)
find_path(LIBGPIOD_INCLUDE_DIR NAMES gpiod.h)
include_directories(${LIBGPIOD_INCLUDE_DIR})

find_library(SYSTEMD systemd)
find_path(SYSTEMD_INCLUDE_DIR NAMES systemd/sd-daemon.h)
include_directories(${SYSTEMD_INCLUDE_DIR})

# Unit Testing
add_definitions (-DIS_OSS=true)
find_package(Threads REQUIRED)
Expand Down Expand Up @@ -816,7 +842,7 @@ if (GITHUB_ACTIONS_BUILD)
weutil_crc16_ccitt_test
weutil_fboss_eeprom_parser_test
sensor_service_sw_test
sensor_service_utils_tests
sensor_service_utils_test
rackmon_test
fan_service_sw_test
data_corral_service_hw_test
Expand Down
30 changes: 15 additions & 15 deletions buck2
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,62 @@
"name": "buck2",
"platforms": {
"macos-aarch64": {
"size": 24650797,
"size": 24793637,
"hash": "blake3",
"digest": "c1d538cde7ac6ad0d8f12671420d09786622a97ae186ce4f8e676861910ae45b",
"digest": "bb0035bb305bf3b6bb381b2c98063ab0912f77fcb3603a891cac4c59d17b2795",
"format": "zst",
"path": "buck2-aarch64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-11-15/buck2-aarch64-apple-darwin.zst"
}
]
},
"linux-aarch64": {
"size": 26956137,
"size": 27097669,
"hash": "blake3",
"digest": "5bcb0ee9ed84799206d0cffd52e4b5ff4cacc9b1522d984f25e17c94414519c3",
"digest": "70c796a8e7470a497d6251963c1d9da1679266f4ba1fdbf44a252aeac1687d8c",
"format": "zst",
"path": "buck2-aarch64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-11-15/buck2-aarch64-unknown-linux-musl.zst"
}
]
},
"macos-x86_64": {
"size": 26405161,
"size": 26566564,
"hash": "blake3",
"digest": "e388933ebd3bf8e2f9dcd20dbba33fe033319b1a07a67d92ef33e6c188512cb2",
"digest": "f2d32397d72a0f3d96dd3265a525a9264ecc5aacc01c9f53ef1be7864f792c6c",
"format": "zst",
"path": "buck2-x86_64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-11-15/buck2-x86_64-apple-darwin.zst"
}
]
},
"windows-x86_64": {
"size": 21795979,
"size": 21945285,
"hash": "blake3",
"digest": "7712324d3e71e487b76860f42f9a0d0e8bc49e692c13ce5053aabe8f1a30be8d",
"digest": "e0ebb882535cc24439025b39a023ae2148fc9f4733ab3552dbce396f964dd549",
"format": "zst",
"path": "buck2-x86_64-pc-windows-msvc.exe",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-pc-windows-msvc.exe.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-11-15/buck2-x86_64-pc-windows-msvc.exe.zst"
}
]
},
"linux-x86_64": {
"size": 27977618,
"size": 28049273,
"hash": "blake3",
"digest": "6f611bbf77c9544831405e68607682523f20f22aa55df1c5a3461f9c3a0cfa03",
"digest": "4ce1ccad2e051ac169d165905de2e3de68558a74e90756c71ab04fa78e38d23b",
"format": "zst",
"path": "buck2-x86_64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-11-15/buck2-x86_64-unknown-linux-musl.zst"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fb303-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 416aa3d1ff335d0dea665989ade77dd9f2a2a99c
Subproject commit 9c2bca662d6b0dade4739b2bbd093c39cd12f8fa
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fbthrift-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 78e5b27861982706b85ff5c9009c68d360f042aa
Subproject commit c2812a8afeddde67ebd9fd8ea275be269e5dc79d
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/folly-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit b8b1850df06e286ab510dafc1ebe7ab91ecd4141
Subproject commit dd1de90149f37d91674272e3721620a69ed9841d
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/wangle-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 1fc174e3de49c385f33b4fbb4a4e8e0798e15122
Subproject commit 562c4a1a4c65deb1a2007c4056a885efedbab021
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebookincubator/fizz-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 787df81d7a579315e35b71500fc358582045c2a5
Subproject commit 4c3c90f3d01289d44114ecc7cf01139d8c1de6ea
55 changes: 55 additions & 0 deletions build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,61 @@ def _build(self, reconfigure) -> None:
self._run_cmd(install_cmd, env=env)


class SystemdBuilder(BuilderBase):
# SystemdBuilder assumes that meson build tool has already been installed on
# the machine.
def __init__(
self,
loader,
dep_manifests,
build_opts,
ctx,
manifest,
src_dir,
build_dir,
inst_dir,
) -> None:
super(SystemdBuilder, self).__init__(
loader,
dep_manifests,
build_opts,
ctx,
manifest,
src_dir,
build_dir,
inst_dir,
)

def _build(self, reconfigure) -> None:
env = self._compute_env()
meson = path_search(env, "meson")
if meson is None:
raise Exception("Failed to find Meson")

# Meson builds typically require setup, compile, and install steps.
# During this setup step we ensure that the static library is built and
# the prefix is empty.
self._run_cmd(
[
meson,
"setup",
"-Dstatic-libsystemd=true",
"-Dprefix=/",
self.build_dir,
self.src_dir,
]
)

# Compile step needs to satisfy the build directory that was previously
# prepared during setup.
self._run_cmd([meson, "compile", "-C", self.build_dir])

# Install step
self._run_cmd(
[meson, "install", "-C", self.build_dir, "--destdir", self.inst_dir]
)


class CMakeBuilder(BuilderBase):
MANUAL_BUILD_SCRIPT = """\
#!{sys.executable}
Expand Down
13 changes: 13 additions & 0 deletions build/fbcode_builder/getdeps/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
NopBuilder,
OpenSSLBuilder,
SqliteBuilder,
SystemdBuilder,
)
from .cargo import CargoBuilder
from .expr import parse_expr
Expand Down Expand Up @@ -661,6 +662,18 @@ def create_builder( # noqa:C901
inst_dir,
)

if builder == "systemd":
return SystemdBuilder(
loader,
dep_manifests,
build_options,
ctx,
self,
src_dir,
build_dir,
inst_dir,
)

if builder == "cargo":
return self.create_cargo_builder(
loader,
Expand Down
2 changes: 2 additions & 0 deletions build/fbcode_builder/manifests/fboss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ CLI11
exprtk
nlohmann-json
libgpiod
systemd
range-v3

[shipit.pathmap]
fbcode/fboss/github = .
Expand Down
3 changes: 2 additions & 1 deletion build/fbcode_builder/manifests/glog
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ HAVE_TR1_UNORDERED_SET=OFF
[homebrew]
glog

[debs]
# on ubuntu glog brings in liblzma-dev, which in turn breaks watchman tests
[debs.not(distro=ubuntu)]
libgoogle-glog-dev

[rpms.distro=fedora]
Expand Down
3 changes: 2 additions & 1 deletion build/fbcode_builder/manifests/libunwind
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name = libunwind
libunwind-devel
libunwind

[debs]
# on ubuntu this brings in liblzma-dev, which in turn breaks watchman tests
[debs.not(distro=ubuntu)]
libunwind-dev

[download]
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/range-v3
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ sha256 = 376376615dbba43d3bef75aa590931431ecb49eb36d07bb726a19f680c75e20c
[build]
builder = cmake
subdir = range-v3-0.11.0

[cmake.defines]
RANGE_V3_EXAMPLES=OFF
15 changes: 15 additions & 0 deletions build/fbcode_builder/manifests/systemd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[manifest]
name = systemd

[rpms]
systemd
systemd-devel

[download]
url = https://github.com/systemd/systemd/archive/refs/tags/v256.7.tar.gz
sha256 = 896d76ff65c88f5fd9e42f90d152b0579049158a163431dd77cdc57748b1d7b0


[build]
builder = systemd
subdir = systemd-256.7
3 changes: 2 additions & 1 deletion build/fbcode_builder/manifests/xz
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[manifest]
name = xz

[debs]
# ubuntu's package causes watchman's tests to hang
[debs.not(distro=ubuntu)]
liblzma-dev

[homebrew]
Expand Down
12 changes: 12 additions & 0 deletions cmake/Agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ target_link_libraries(switchinfo_utils
agent_config_cpp2
)

add_library(voq_utils
fboss/agent/VoqUtils.cpp
)

target_link_libraries(voq_utils
Folly::folly
switch_config_cpp2
agent_features
)

target_link_libraries(address_utils
network_address_cpp2
Folly::folly
Expand Down Expand Up @@ -255,6 +265,7 @@ set(core_libs
switchinfo_utils
stats
utils
voq_utils
asic_utils
fb303::fb303
capture
Expand Down Expand Up @@ -457,6 +468,7 @@ target_link_libraries(switchid_scope_resolver
fboss_error
hwswitch_matcher
state
switchinfo_utils
)

add_library(hwagent
Expand Down
1 change: 0 additions & 1 deletion cmake/AgentHw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ add_library(hw_port_fb303_stats
fboss/agent/hw/HwBasePortFb303Stats.cpp
fboss/agent/hw/HwPortFb303Stats.cpp
fboss/agent/hw/HwSysPortFb303Stats.cpp
fboss/agent/hw/oss/HwBasePortFb303Stats.cpp
)

add_library(hw_cpu_fb303_stats
Expand Down
Loading

0 comments on commit 7ff0020

Please sign in to comment.