Skip to content

Commit 51e17c7

Browse files
committed
Convert bssl-compat build from cmake to bazel
Signed-off-by: Ted Poole <tpoole@redhat.com>
1 parent 66aac29 commit 51e17c7

File tree

22 files changed

+1116
-1153
lines changed

22 files changed

+1116
-1153
lines changed

WORKSPACE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ local_repository(
55
path = "bssl-compat",
66
)
77

8+
new_local_repository(
9+
name = "llvm",
10+
path = "/opt/llvm",
11+
build_file = "//bazel/external:llvm.BUILD",
12+
)
13+
814
load("//bazel:api_binding.bzl", "envoy_api_binding")
915

1016
envoy_api_binding()

bazel/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,12 @@ config_setting(
572572
# Alias pointing to the selected version of BoringSSL:
573573
alias(
574574
name = "boringssl",
575-
actual = "@envoy//bssl-compat:ssl"
575+
actual = "@bssl-compat//:ssl"
576576
)
577-
577+
578578
alias(
579579
name = "boringcrypto",
580-
actual = "@envoy//bssl-compat:crypto"
580+
actual = "@bssl-compat//:crypto"
581581
)
582582

583583
config_setting(

bazel/external/llvm.BUILD

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
licenses(["notice"]) # Apache 2
4+
5+
# libclang-cpp from the local installation of llvm
6+
# used by the prefixer in bssl-compt
7+
8+
cc_library(
9+
name = "libclang-cpp",
10+
hdrs = glob([
11+
"include/**/*.h",
12+
"include/**/*.inc",
13+
"include/**/*.def"
14+
]),
15+
includes = ["include"],
16+
defines = [
17+
"LLVM_LIBRARY_DIR=\\\"/opt/llvm/lib/\\\"",
18+
],
19+
linkopts = [
20+
"-L/opt/llvm/lib",
21+
"-lclang-cpp",
22+
"-lstdc++",
23+
"-Wl,-rpath,/opt/llvm/lib",
24+
],
25+
visibility = ["//visibility:public"],
26+
)

bazel/repositories.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def envoy_dependencies(skip_targets = []):
140140
# Binding to an alias pointing to the bssl-compat layer
141141
native.bind(
142142
name = "ssl",
143-
actual = "@envoy//bssl-compat:ssl",
143+
actual = "@bssl-compat//:ssl",
144144
)
145145
native.bind(
146146
name = "crypto",
147-
actual = "@envoy//bssl-compat:crypto",
147+
actual = "@bssl-compat//:crypto",
148148
)
149149

150150
# The long repo names (`com_github_fmtlib_fmt` instead of `fmtlib`) are

0 commit comments

Comments
 (0)