Skip to content

Commit 736b5e1

Browse files
committed
[bazel] Use in-tree openssl for Rust openssl-sys
Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: If6b2be221d2330cbe42062f8cd061da26a6a6964
1 parent 445f70c commit 736b5e1

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

MODULE.bazel

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,18 @@ crate.annotation(
157157
},
158158
repositories = ["crate_index"],
159159
)
160+
161+
inject_repo(
162+
crate,
163+
ot_openssl = "openssl",
164+
)
165+
160166
crate.annotation(
167+
build_script_data = ["@ot_openssl//:gen_dir"],
161168
build_script_env = {
162-
"PKG_CONFIG_PATH": "$(OPENSSL_PKG_CONFIG_PATH)",
169+
"OPENSSL_DIR": "$(execpath @ot_openssl//:gen_dir)",
163170
"OPENSSL_STATIC": "1",
164171
},
165-
build_script_toolchains = ["@lowrisc_opentitan//third_party/rust:openssl_pkg_config_path"],
166172
crate = "openssl-sys",
167173
repositories = ["crate_index"],
168174
)

MODULE.bazel.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

third_party/rust/BUILD

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ config_setting(
1313
values = {"define": "SPECIFY_BINDGEN_LIBSTDCXX=true"},
1414
)
1515

16-
string_flag(
17-
name = "openssl_pkg_config_path",
18-
build_setting_default = "",
19-
make_variable = "OPENSSL_PKG_CONFIG_PATH",
20-
)
21-
2216
# Since rules_rust 0.23.0, bindgen depends on the llvm project and builds the
2317
# llvm libaries from source. Building llvm from source has a huge impact on
2418
# build times. Instead, we depend on a pre-built llvm release and instantiate

0 commit comments

Comments
 (0)