11module (name = "tesseract" , version = "1.0" )
22
3- bazel_dep (name = "bazel_skylib" , version = "1.7.1 " )
4- bazel_dep (name = "platforms" , version = "0 .0.10 " )
5- bazel_dep (name = "rules_python" , version = "0.40 .0" )
6- bazel_dep (name = "rules_cc" , version = "0.0 .17" )
7- bazel_dep (name = "pybind11_bazel" , version = "2.13.6 " )
3+ bazel_dep (name = "bazel_skylib" , version = "1.9.0 " )
4+ bazel_dep (name = "platforms" , version = "1 .0.0 " )
5+ bazel_dep (name = "rules_python" , version = "1.9 .0" )
6+ bazel_dep (name = "rules_cc" , version = "0.2 .17" )
7+ bazel_dep (name = "pybind11_bazel" , version = "3.0.0 " )
88
99DEFAULT_PYTHON_VERSION = "3.13"
1010
@@ -29,3 +29,98 @@ pip.parse(
2929)
3030
3131use_repo (pip , "pypi" )
32+
33+ http_archive = use_repo_rule ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
34+ git_repository = use_repo_rule ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" )
35+ bazel_dep (name = "zlib" , version = "1.3.2" )
36+
37+ HIGHS_VERSION = "1.9.0"
38+ HIGHS_SHA_256 = "dff575df08d88583c109702c7c5c75ff6e51611e6eacca8b5b3fdfba8ecc2cb4"
39+
40+ git_repository (
41+ name = "stim" ,
42+ commit = "bd60b73525fd5a9b30839020eb7554ad369e4337" ,
43+ remote = "https://github.com/quantumlib/stim.git" ,
44+ shallow_since = "1741128853 +0000" ,
45+ )
46+
47+ http_archive (
48+ name = "highs" ,
49+ sha256 = HIGHS_SHA_256 ,
50+ build_file = "//external:highs.BUILD" ,
51+ strip_prefix = "HiGHS-" + HIGHS_VERSION ,
52+ urls = ["https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v" + HIGHS_VERSION + ".tar.gz" ],
53+ )
54+
55+ GTEST_VERSION = "1.13.0"
56+
57+ GTEST_SHA256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363"
58+
59+ http_archive (
60+ name = "gtest" ,
61+ sha256 = GTEST_SHA256 ,
62+ strip_prefix = "googletest-%s" % GTEST_VERSION ,
63+ urls = ["https://github.com/google/googletest/archive/refs/tags/v%s.tar.gz" % GTEST_VERSION ],
64+ )
65+
66+ ARGPARSE_SHA_256 = "3e5a59ab7688dcd1f918bc92051a10564113d4f36c3bbed3ef596c25e519a062"
67+
68+ http_archive (
69+ name = "argparse" ,
70+ build_file = "//external:argparse.BUILD" ,
71+ sha256 = ARGPARSE_SHA_256 ,
72+ strip_prefix = "argparse-3.1" ,
73+ urls = ["https://github.com/p-ranav/argparse/archive/refs/tags/v3.1.zip" ],
74+ )
75+
76+ git_repository (
77+ name = "nlohmann_json" ,
78+ commit = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" ,
79+ remote = "https://github.com/nlohmann/json.git" ,
80+ shallow_since = "1701207391 +0100" ,
81+ )
82+
83+
84+
85+
86+ BOOST_VERSION = "1.83.0"
87+ BOOST_ARCHIVE_NAME = "boost_{}" .format (BOOST_VERSION .replace ("." , "_" ))
88+
89+ http_archive (
90+ name = "boost" ,
91+ urls = [
92+ "https://archives.boost.io/release/{}/source/{}.tar.gz" .format (
93+ BOOST_VERSION ,
94+ BOOST_ARCHIVE_NAME ,
95+ )
96+ ],
97+ strip_prefix = BOOST_ARCHIVE_NAME ,
98+ sha256 = "c0685b68dd44cc46574cce86c4e17c0f611b15e195be9848dfd0769a0a207628" ,
99+ build_file = "//external:boost.BUILD" ,
100+ )
101+
102+
103+ ###
104+
105+ cc_compatibility_proxy = use_extension ("@rules_cc//cc:extensions.bzl" , "compatibility_proxy" )
106+ use_repo (cc_compatibility_proxy , "cc_compatibility_proxy" )
107+
108+ bazel_dep (name = "toolchains_llvm" , version = "1.6.0" )
109+
110+ llvm = use_extension ("@toolchains_llvm//toolchain/extensions:llvm.bzl" , "llvm" )
111+ llvm .toolchain (
112+ name = "llvm_toolchain" ,
113+ llvm_version = "17.0.6" , # Downloads a self-contained Clang/LLVM 17
114+ )
115+
116+ # 3. Inject your custom GLIBC 2.28 sysroot
117+ llvm .sysroot (
118+ name = "llvm_toolchain" ,
119+ label = "//custom_sysroot:sysroot" ,
120+ targets = ["linux-x86_64" ], # Assuming you are building for x86_64 Linux
121+ )
122+ use_repo (llvm , "llvm_toolchain" )
123+
124+ # 4. Register the toolchain to override the host OS compiler
125+ register_toolchains ("@llvm_toolchain//:all" )
126+
0 commit comments