Files
isaacandClaude Opus 5 73a2e4be1b build: load cc_binary from rules_cc for Bazel 9
Bazel 9 removed the native cc_* rules, so the CLI target needs an
explicit load(). Also point the build docs at the version versions.json
pins (now 9.2.0) rather than a hardcoded 8.4.2, and drop the stale claim
that Bazel 9 is incompatible with this codebase.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

(cherry picked from commit cf22c733cd)

Already in dev/android (via 45fc400/120e384), left as is:
  CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:49:48 +04:00

44 lines
1.3 KiB
Python

load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
cc_binary(
name = "tgcalls_cli",
srcs = [
"main.cpp",
"group_mode.cpp",
"group_mode.h",
"group_participant.cpp",
"group_participant.h",
"group_churn_mode.cpp",
"group_churn_mode.h",
"fake_video_source.h",
"fake_video_source.cpp",
"fake_video_sink.h",
],
copts = [
"-I{}/tgcalls/tgcalls".format("submodules/TgVoipWebrtc"),
"-Ithird-party/webrtc/webrtc",
"-Ithird-party/webrtc/dependencies",
"-Ithird-party/webrtc/absl",
"-Ithird-party/libyuv",
"-DRTC_ENABLE_VP9",
"-DNDEBUG",
"-std=c++17",
"-w",
] + select({
"@platforms//os:linux": ["-DWEBRTC_LINUX", "-DWEBRTC_POSIX"],
"//conditions:default": ["-DWEBRTC_MAC", "-DWEBRTC_POSIX"],
}),
linkopts = select({
"@platforms//os:linux": ["-lpthread", "-lm", "-ldl"],
"//conditions:default": ["-framework", "CoreFoundation", "-framework", "Security"],
}),
deps = [
"//submodules/TgVoipWebrtc:tgcalls_core",
"//submodules/TgVoipWebrtc/tgcalls/tools/go_sfu",
],
data = [
"//submodules/TgVoipWebrtc:reference_core_wasm",
"//submodules/TgVoipWebrtc:variant_core_wasm",
],
)