Skip to content

Commit ff4df87

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 ff4df87

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

MODULE.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,15 @@ crate.annotation(
157157
},
158158
repositories = ["crate_index"],
159159
)
160+
161+
inject_repo(crate, ot_openssl="openssl")
162+
160163
crate.annotation(
164+
build_script_data = ["@ot_openssl//:gen_dir"],
161165
build_script_env = {
162-
"PKG_CONFIG_PATH": "$(OPENSSL_PKG_CONFIG_PATH)",
166+
"OPENSSL_DIR": "$(execpath @ot_openssl//:gen_dir)",
163167
"OPENSSL_STATIC": "1",
164168
},
165-
build_script_toolchains = ["@lowrisc_opentitan//third_party/rust:openssl_pkg_config_path"],
166169
crate = "openssl-sys",
167170
repositories = ["crate_index"],
168171
)

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)