Skip to content

Commit ded0fb4

Browse files
committed
Convert bssl-compat build from cmake to bazel
Signed-off-by: Ted Poole <[email protected]>
1 parent 66aac29 commit ded0fb4

File tree

23 files changed

+1133
-1164
lines changed

23 files changed

+1133
-1164
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
licenses(["notice"]) # Apache 2
4+
5+
# libclang-cpp from llvm, used by the bssl-compat prefixer tool.
6+
cc_library(
7+
name = "libclang-cpp",
8+
srcs = glob(["lib/libclang-cpp.*"]),
9+
hdrs = glob(["include/**/*"]),
10+
includes = ["include"],
11+
linkopts = ["-lstdc++"],
12+
visibility = ["//visibility:public"],
13+
)
14+
15+
# The clang compiler built-in headers (stdef.h, limits.h etc)
16+
filegroup(
17+
name = "clang-headers",
18+
srcs = glob(["lib/clang/*/include/**/*.h"]),
19+
visibility = ["//visibility:public"],
20+
)

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)