Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
59 lines (53 loc) · 2.02 KB
/
Copy pathMODULE.bazel
File metadata and controls
59 lines (53 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2026 Samvel Khalatyan. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
module(
name = "lab",
version = "head",
)
# keep-sorted start
bazel_dep(name = "abseil-cpp", version = "20260817.0")
bazel_dep(name = "bazel_skylib", version = "1.9.2")
bazel_dep(name = "gazelle", version = "0.54.0")
bazel_dep(name = "gazelle_cc", version = "0.6.0")
bazel_dep(name = "googletest", version = "1.18.0.bcr.1")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_cc", version = "0.2.28")
bazel_dep(name = "rules_go", version = "0.65.0")
bazel_dep(name = "rules_java", version = "9.9.0")
# keep-sorted end
register_toolchains("//toolchain:cc_toolchain_freebsd_x86_64")
single_version_override(
module_name = "abseil-cpp",
patch_strip = 1,
patches = [
"//third_party/patch/abseil-cpp/20260817.0:0001-cctz-fix-implicit-int-conversion-error-on-FreeBSD.patch",
],
version = "20260817.0",
)
single_version_override(
module_name = "rules_java",
patch_strip = 1,
patches = [
"//third_party/patch/rules_java/9.9.0:0001-exclude-man-pages-from-jdk-lib.patch",
],
version = "9.9.0",
)
# Lab runs Bazel in a FreeBSD jail using Linux Binary Compatibility:
# https://docs.freebsd.org/en/books/handbook/linuxemu/
#
# Unfortunately, Go is confused by this hybrid setup (as of Oct 2025). The
# linker fails at calling ld.Mmap:
# https://cs.opensource.google/go/go/+/master:src/cmd/link/internal/ld/main.go;l=453;drc=839da71f8907ac4434299db4353db31835c916df
#
# Fortunately, FreeBSD jail can run both Linux and FreeBSD binaries in this
# setup - Linux binaries expect to find Linux libraries, installed under
# /compat/<name>, otherwise everything else is the same.
#
# A short-term solution is to make a custom install of Go for Linux under
# /compat/<name>. It uses Linux distributiion with FreeBSD linker swapped in.
#
# See: ./go_install.sh
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.host()