Skip to content

Commit 56715af

Browse files
committed
[bazel] Use in-tree openssl for softhsm2
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
1 parent 6a0e567 commit 56715af

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

third_party/hsm/BUILD.softhsm2.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ filegroup(
1414
cmake(
1515
name = "softhsm2",
1616
build_args = ["-j"],
17+
build_data = ["@openssl//:gen_dir"],
1718
cache_entries = {
1819
"ENABLE_GOST": "OFF",
1920
"ENABLE_P11_KIT": "OFF",
2021
"ENABLE_STATIC": "OFF",
2122
"ENABLE_ECC": "ON",
2223
"WITH_CRYPTO_BACKEND": "openssl",
24+
"OPENSSL_ROOT_DIR": "${OPENSSL}/install",
2325

2426
# This build is for tests only.
2527
# "CMAKE_BUILD_TYPE": "Debug",
@@ -38,9 +40,13 @@ cmake(
3840
# "-DDEBUG_LOG_STDERR",
3941
# "-DSOFTHSM_LOG_FUNCTION_NAME",
4042
],
43+
env = {
44+
"OPENSSL": "$$(dirname $(execpath @openssl//:gen_dir))",
45+
},
4146
lib_source = ":all_srcs",
4247
out_binaries = ["softhsm2-util"],
4348
out_shared_libs = ["softhsm/libsofthsm2.so"],
49+
deps = ["@openssl//:ssl"],
4450
)
4551

4652
filegroup(

0 commit comments

Comments
 (0)