42 Commits

Author SHA1 Message Date
Lily Chen 8b43ff0f72 Update version for Bazel Central Repository to 0.20260713.0
Change-Id: I16c9fb95fe0cbdf221d1553490418a1fab809a67
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/98767
Commit-Queue: Lily Chen <chlily@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2026-07-13 06:03:17 -07:00
Xiangfei Ding 3adc3d1aba Update version for Bazel Central Repository to 0.20260616.0
Change-Id: I5dc13845136082850abdc454768081ce0f242039
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/97467
Reviewed-by: Rudolf Polzer <rpolzer@google.com>
Commit-Queue: Xiangfei Ding <xfding@google.com>
2026-06-16 05:32:16 -07:00
David Benjamin fc012d85f1 Add a tool to update bazel dependencies
Change-Id: I5cf532ca6a6d185b3aadee740863e58ecd64ac7a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/96747
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2026-06-05 12:24:45 -07:00
David Benjamin 7ac48573ce Update bazel dependencies
Change-Id: I3afbf792f654bad779e18eb505f1c820343af2b2
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/96748
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
2026-06-05 11:29:31 -07:00
Rudolf Polzer 190fa71435 Tag new BoringSSL release for Bazel.
Change-Id: Iae9c3990fbf838e9f1f0acfeb29d7deb6a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/95767
Auto-Submit: Rudolf Polzer <rpolzer@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2026-05-26 09:30:00 -07:00
Xiangfei Ding d589045a77 Bump version for Bazel Central Registry
Signed-off-by: Xiangfei Ding <xfding@google.com>
Change-Id: Ie58754f63f236abe725739c5a2fa59206a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/95048
Reviewed-by: Rudolf Polzer <rpolzer@google.com>
Presubmit-BoringSSL-Verified: boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-05-08 04:25:09 -07:00
Rudolf Polzer 78f7fbeec9 Bump version for Bazel Central Registry release.
Change-Id: Ic3c0828d30b0fd033ea9212562f85d096a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/92508
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Rudolf Polzer <rpolzer@google.com>
Auto-Submit: Rudolf Polzer <rpolzer@google.com>
2026-04-13 23:05:39 -07:00
David Benjamin b2dfa0f4e5 Update dependencies from BCR
Change-Id: Idf127bed5cf7813b996de60c264382e29dc52090
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/92107
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Rudolf Polzer <rpolzer@google.com>
Commit-Queue: Rudolf Polzer <rpolzer@google.com>
2026-04-09 00:30:01 -07:00
Lily Chen 4c91be649f Bump version for BCR to 0.20260327.0
Change-Id: Idd9565109b42db63e996eeb0e06ff7296a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/91647
Reviewed-by: Xiangfei Ding <xfding@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
Auto-Submit: Lily Chen <chlily@google.com>
2026-03-27 09:14:30 -07:00
xfding 617634bc01 Bump BCR
Signed-off-by: Xiangfei Ding <xfding@google.com>
Change-Id: I197286d95f78e4f0e7d982a684fc3ae56a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/89208
Reviewed-by: Rudolf Polzer <rpolzer@google.com>
2026-02-11 06:55:20 -08:00
David Benjamin 2e606c2dbf Update other dependencies
While I'm here. Also document how to pick the Bazel version.

libc++'s __config_site needs another update. They keep coming up with
new settings we're required to set.

Change-Id: I49feedd75e5a38f07927aa1880916aadcd6bd91a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/88947
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
2026-02-09 15:07:10 -08:00
David Benjamin 2a5cd33a2a Update third_party/benchmark to 1.9.5
Picks up
https://github.com/google/benchmark/commit/d8db2f90b643eb28a12976beb4d57bcfb639911d

This results in deprecation warnings with benchmark::internal::Benchmark
so go ahead and fix those.

Also add third_party/benchmark to .bazelignore. This stops
`bazel test ...` from recursing in here. It looks like we previously
suppressed copying some files, but we can avoid having to post-process
the files this way.

Change-Id: Idf20fce28153a450fe03e121d9bc0d601d43ec6c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/88948
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
2026-02-09 14:50:34 -08:00
Rudolf Polzer a35389e3da New BCR release.
Bug: 339645788
Change-Id: I39202f6fbb07f959bc3bc63f47ae198c6a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/88547
Commit-Queue: Xiangfei Ding <xfding@google.com>
Commit-Queue: Rudolf Polzer <rpolzer@google.com>
Auto-Submit: Rudolf Polzer <rpolzer@google.com>
Reviewed-by: Xiangfei Ding <xfding@google.com>
2026-02-04 02:43:46 -08:00
David Benjamin 9788a2d730 Check in .bazelversion and MODULE.bazel.lock in util/bazel-example
In preparation for testing this on CI. For some reason I don't
understand, there were also some outstanding updates in
MODULE.bazel.lock for the root, yet CI was working. Document the command
to update MODULE.bazel.lock, taken from
https://bazel.build/external/lockfile#best-practices

(I'm not sure why this file is so large. Go's go.sum is fairly small and
controlled.)

Bug: 465497708
Change-Id: I8365c42facf5a345e270113bdc9be7cf8e7771af
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/85430
Reviewed-by: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
2025-12-09 14:17:32 -08:00
Xiangfei Ding 23dec3c983 Use google/benchmark for performance tracking
In this patch we would vendor google/benchmark and break down the
benchmark into individual translation units, so that the benchmark
framework can apply filters on which benchmark code to run.

This patch vendors google/benchmark 1.9.4

Source: https://github.com/google/benchmark
Commit: eddb0241389718a23a42db6af5f0164b6e0139af

How to run the benchmark:

Benchmarks need to be built by passing in `-DBUILD_TESTING=ON` to CMake,
which is set by default.
To invoke the benchmarks, execute the `bssl_bench` binary.

You have the option to enumerate all of the benchmarks first by passing in
`--benchmark_list_tests`.
To run specific benchmarks, you may pass in `--benchmark_filter=$regex` where
`$regex` is an [`ECMAScript regular expression`](https://cppreference.com/w/cpp/regex/ecmascript.html).

You can specify a set of input sizes in bytes for relevant cipher suites
with the repeatable flag `-i` or `--input-size`.
You can let the benchmark run with a set of various thread counts with the
repeatable flag `-t` or `--threads`.
For more benchmark configuration options, you may read the manual by passing
in `--help` flag on launch.

Co-authored-by: Rudolf Polzer <rpolzer@google.com>
Bug: 383769319
Change-Id: Ic8d4cfd65065e61ae90c58bddb34463a5f398f14
Signed-off-by: Xiangfei Ding <xfding@google.com>
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83327
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2025-12-08 10:33:22 -08:00
Rudolf Polzer 79048f1f1d Bump version for BCR release.
Change-Id: I04f428b74af8fd961863c0cf9c828226448ab257
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/84567
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: Rudolf Polzer <rpolzer@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2025-11-24 07:23:20 -08:00
David Benjamin 2e2a00337a Update all the Bazel things
It seems we need Bazel 7.6.2 or later to pick up a fix to the
apple_support package for the newest Xcode. Ideally we'd go to 7.7.0,
but CIPD seems not to have a package.

While I'm here, update other deps from BCR.

Change-Id: I30c339eda4aab22beed11d0acf1094dc5e16e4c9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83947
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
2025-11-10 12:06:04 -08:00
Lily Chen ec4fb365a9 Bump version for BCR
Change-Id: I5e1fcc6a1c6809f3f999ce6e2f626fa29c1ef11e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83907
Auto-Submit: Lily Chen <chlily@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2025-11-10 08:00:35 -08:00
David Benjamin 91a66a59b6 Fix util/bazel-example under Bazel 9.0.0rc1
We need to explicitly import rules_cc. See
https://github.com/bazelbuild/bazel-central-registry/issues/6402

Change-Id: I648dd64fb2a6c21264dd9d664643ec76cd3a297a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83567
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
2025-11-04 08:43:06 -08:00
David Benjamin 52bb3988e3 Update Bazel deps and bump version for BCR
Change-Id: I4cec91ceadf1be7413085f56c2f9efaa18fc8ca2
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/82547
Reviewed-by: Lily Chen <chlily@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
2025-10-02 10:17:00 -07:00
David Benjamin 2c8fdd5919 Bump version for BCR
Change-Id: Iab3e25d428bd1c77c69571d8e39aa950ca05f925
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81387
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
2025-08-18 14:35:01 -07:00
David Benjamin e20e848655 Bump Bazel deps and version for BCR
Change-Id: I0dfb264c2b7db6311902dd8b190da200a3092f24
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81127
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2025-08-07 14:19:07 -07:00
David Benjamin f3dcc4660d Update tools and prep for 0.20250701.0
Change-Id: Ib5ea19193fac2956d0b57117bbe0a7109b51fe21
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/80067
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
2025-07-01 10:17:32 -07:00
David Benjamin 02bc0949e5 Update most deps and bump version
I've kept the LLVM things back for now because Chrome seems to be in
some weird halfway point where libc++abi depends on a macro that libc++
doesn't have yet? I'm not really sure what's going on there and why it's
building for Chrome, but hopefully next time it will have settled.

I've also, for now, kept bazel at 7.5.0. We probably shouldn't update to
8.x on CI until that's our minimum version. There is a 7.6.1, but CIPD's
Bazel packages seem to only make a build for a version if newer than the
latest one, so all 7.x versions after 8.0.0's release are missing.

We may need to do something about this later, but ignoring the problem
for now.

Change-Id: Id17a3b394f68659e91a6dc563aaa40cd6912c1db
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/79327
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2025-05-14 15:04:40 -07:00
David Benjamin 2b44a3701a Bump version for BCR
Change-Id: I3d1635a5e9b989ad527d8e2ed28fb0684054fff9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/78567
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2025-04-16 09:03:08 -07:00
David Benjamin 2667ae3e6f Make MODULE.bazel and BUILD.bazel buildifier-clean
Change-Id: I95427797815c25f987d72764292b971adafa52c7
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/77707
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
2025-03-15 21:05:48 -07:00
David Benjamin 562ed3183a Update deps and tag a version for BCR
Also bump BORINGSSL_API_VERSION for draft-ietf-tls-cross-sni-resumption.

Change-Id: Ie71484f701d232e2138abef504aca95e1d58f23c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/77347
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2025-03-11 10:52:14 -07:00
David Benjamin d820bb6100 Bump version for BCR
Bug: 396087264
Change-Id: I7a57c6c9cfbd5dc10488944aadcf3fb352fda105
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/76207
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2025-02-13 10:10:52 -08:00
David Benjamin b78bfd7153 Update dependencies
Notably Go and rules_cc, but also pick up the rest while I'm here.
Updating libc++ once again required reworking the config. They seem to
change it every couple of weeks.

Bug: 396087264
Change-Id: Ied0f6fa11cd8c34fe9f0f87e63fd6283a699a22c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/76167
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
2025-02-13 09:45:44 -08:00
David Benjamin 33d1049b1f Switch the license to Apache 2.0, matching OpenSSL upstream
We use the standard Apache 2.0 file header, described in "APPENDIX: How
to apply the Apache License to your work."

This was primarily automated by running:

  git ls-tree -r --name-only HEAD | xargs go run ./util/relicense.go

See go/boringssl-relicensing-triage for the results of triaging the
output of the tool.

As part of this, switch from taking fiat-crypto under MIT license to
Apache 2.0. (It is licensed under MIT OR Apache-2.0 OR BSD-1-Clause.)

The copyright_summary tool can also be used to confirm we didn't
accidentally drop any copyright lines:

  # Run before the CL
  git grep -l Copyright | xargs go run ./util/copyright_summary.go  -out /tmp/old.json
  # Run after the CL
  git grep -l Copyright | xargs go run ./util/copyright_summary.go  -compare /tmp/old.json

Bug: 364634028
Change-Id: I17c50e761e9d077a1f92e25969e50ed35e320c59
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/75852
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2025-02-03 15:05:16 -08:00
David Benjamin 571a7432a1 Bump MODULE.bazel for another snapshot
Also update deps from BCR while I'm here.

Change-Id: I7afe58655e966ab9e7d1c99d13a9c9f7594af51c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/75229
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2025-01-14 14:15:03 -08:00
David Benjamin 6f4159567d Start maintaining an AUTHORS file
Following the guidance in
https://opensource.google/documentation/reference/releasing/authors,
start maintaining an AUTHORS file.

Update all existing Google copyright lines to 'The BoringSSL Authors'
per the document. This CL also changes the styling to match the new
guidance: removed the '(c)' and the comma.

All other existing copyright lines are left unmodified. Going forward,
our preference will be that new contributions to BoringSSL use 'The
BoringSSL Authors', optionally adding to the AUTHORS file if the
contributor desires.

To avoid being presumptuous, this CL does *not* proactively list every
past contributor in the BoringSSL half of the AUTHORS file. Past
contributors are welcome to send us a patch to be added, or request that
we add you. (Listed or not, the commit log continues to be a more
accurate record, and any existing non-Google copyright lines were left
unmodified.)

The OpenSSL half of the AUTHORS file is seeded with the contents of the
current OpenSSL AUTHORS file, as of writing. The current contents in the
latest revision of the 1.1.1 branch
(b372b1f76450acdfed1e2301a39810146e28b02c) and master
(d992e8729ee38b082482dc010e090bb20d1c7bd5) are identical, just formatted
in text vs Markdown.

Note when reviewing: CONTRIBUTING.md and AUTHORS contain non-mechanical
changes.

Bug: 364634028
Change-Id: I319d0ee63ec021ad85e248e8e3304b9cf9566681
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/74149
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2024-12-11 13:52:41 -08:00
David Benjamin b6eec48a57 Bump the MODULE.bazel version again
The last one had some GCC warnings that have since been doubly resolved
by both removing the offending build configuration and removing the
offending code.

Change-Id: I7c7921fb85baf5f94d0757182cb2d2531a169fb5
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/73967
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
2024-12-09 18:14:40 +00:00
David Benjamin 2635bedc5d Bump MODULE.bazel to 0.20241203.0
Been a moment since we'd tagged one of these.

Change-Id: I08c7f03f06e9fa1507eb4584e368815afb32ffc5
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/73868
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
2024-12-03 19:45:01 +00:00
David Benjamin 059585c8da Update tools and add a .bazelversion
So that MODULE.bazel.lock is actually checked to be up-to-date, we
should run with --lockfile_mode=error on CI. But since the lock file
format changes by Bazel version, that means we also need to pick a
particular Bazel version.

This matches the best practices documented here:
https://bazel.build/external/lockfile#best-practices

To update libc++, we now need to pull in a bit of LLVM libc. See
https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701

Change-Id: I53b28067bab86d34be8c76625d6bedc23f0baeba
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/73487
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2024-11-28 00:01:55 +00:00
Bob Beck 781a72b2aa Update BCR to 20241024.0
Change-Id: I2cbbb95297bc27eceeef76a6afb11cef24380557
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/72410
Commit-Queue: David Benjamin <davidben@google.com>
Auto-Submit: Bob Beck <bbe@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
2024-10-24 22:18:37 +00:00
David Benjamin 81345b8450 Bump module version and Bazel dependencies
Not sure what cadence we'll settle to for these snapshots, but let's
kick off another one. I've gone ahead and updated the dependencies from
https://registry.bazel.build, because it seemed natural to just do those
at the same time.

Change-Id: Ifa609a80c110a1cbf196f9f1a23fb8d533b029f9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71667
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
2024-10-01 22:18:09 +00:00
David Benjamin 581f83dcdb Prepare to tag 0.20240913.0 as the first periodic snapshot
BoringSSL is a "live at head" project and does not make release
branches and thus releases.

However, some systems cannot consume git revisions and expect git tags.
In Bazel Central Registry's case, the toolchain is suspicious of
non-"release" archives of
https://github.blog/open-source/git/update-on-the-future-stability-of-source-code-archives-and-hashes/

To accommodate such systems, let's start periodically tagging snapshots
as "releases". These versions do not represent any kind of stability or
development milestone.  BoringSSL does not branch at these releases and
will not cherry-pick bugfixes to them. Unless there is a technical
constraint to use one of these revisions, projects should simply use the
latest revision when updating.

Also, so that cutting such revisions is less tedious, probably the
simplest is to set MODULE.bazel's version field in HEAD to whatever the
last revision was. The process will then be:

1. Bump MODULE.bazel's version
2. Create a git tag
3. Create a GitHub "release"
4. Kick off a BCR update

All that mess will ideally be automated, but for now we'll drive that
manually. Update INCORPORATING.md to explain these tags, and also to
discuss the new pregenerated build files.

Versioning scheme is chosen as 0.YYYYMMDD.N so that:
- It is deterministic from the date
- It begins with zero lest anyone misinterpret these as semver versions
- We have a digit at the end to bump when we need to cut two revisions
  in one day

Change-Id: Ie256a5f0f7eaac5928b537c75f82402c934f9fc3
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71227
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2024-09-13 22:52:17 +00:00
David Benjamin 40ec347196 Switch to rules_license
Apparently Bazel has deprecated the built-in licenses() command and now
expects you to pull in an external package. I think I've gotten this
right?

Since our new BUILD.bazel file is actually referenced by the old
-with-bazel branch, this new dependency also needs to work there. That
is still using the legacy WORKSPACE system, but I got that working there
too, I think. However, as the legacy WORKSPACE system does not consider
recursive dependencies, anyone using it and updating BoringSSL will need
to, in turn, update their WORKSPACE file on update.

Fixed: 365824757
Change-Id: I7b49f33d628cec2ec07a47f0e31f16765d0f532a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71147
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Ben Lawson <benlawson@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2024-09-11 00:38:27 +00:00
David Benjamin 6abe18402e Update bzlmod dependencies
Change-Id: I073ca90b6f675bf0461ab1a953a5de6808d66968
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71047
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2024-09-10 23:16:32 +00:00
David Benjamin 2db0eb3f96 Make googletest a full dependency, not a dev_dependency
In principle, googletest is only needed for tests and could be a
dev_dependency. But it would then be impossible for downstream modules
to run BoringSSL's tests. The downstream module provides the toolchain,
so we may need to request they run tests when triaging issues. If
https://github.com/bazelbuild/bazel/issues/22187 is ever fixed, we can
change this.

With this change, the following works:

  cd util/bazel-example
  bazelisk test @boringssl//:crypto_test

Change-Id: Ied2276047de134883d6b61b0789f3c7bfcaad669
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68127
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2024-04-29 23:21:36 +00:00
David Benjamin e2d7f2d625 Add a standalone Bazel build
Now that we can generate build files, we can actually maintain a Bazel
build in HEAD, without synthesizing a separate "-with-bazel" branch.
(Though we'll still need both for a transition, and until all the other
build modes have migrated.) Note this has a slightly different directory
structure than the old -with-bazel branch. But the targets are the same
and #include <openssl/whatever.h> still works, so hopefully it's
compatible.

For now, I'm only setting this up with the new bzlmod scheme. Also since
pulling in googletest is much less tedious with bzlmod, I've wired up
tests and everything.

https://bazel.build/external/overview#bzlmod

To build, run commands like:

   bazelisk build ...
   bazelisk test ...
   bazelisk run :bssl

The thinking is we can also go add this to CI and whatnot.

This is also intended to replace the boringssl module in the
bazel-central-registry which someone else set up already. To ease the
transition, I've seeded the compatibility_level value with theirs. (I
think we want to never bump it. Although we don't do SemVer, I think
bzlmod's MVS version selection scheme is generally reasonable. Bumping
it just introduces hiccups into the update process where projects need
to coordinate updates, and we do not want that.)

I wasn't clear on what to put in the version field in the tree, so I
just went with 0.0.0-dev so we don't have to change it, but it's still
vaguely analogous to the versions already in there.

As part of this, I've added support for Bazel's runfiles mechanism in
crypto/test/test_data.cc. This is completely undocumented and I had to
figure out how it works by guessing, but I believe this is the
officially supported way to make cc_test(data = ...) work? The official
documentation says to use devtools_build::GetDataDependencyFilepath, but
that API does not exist in the first place. I've also made it build with
C++17 for now, so we can build libpki, but C++14 consumers should still
be able to use this module, just not build libpki.

To that end, one difference between this and the old module is that we
no longer specify the C++ version in the build. From what I can tell,
Bazel does *not* want libraries to set the C/C++ version and prefers it
only come from the root. Unfortunately, they provide zero tools to
effectively manage this. I've followed this pattern for C++ versions, as
we can assume that Bazel projects are very aware of their C++ version,
but I've explicitly ignored it for the C version. Projects tend not to
change ABIs by C version, so it should be fine to set it internally.

For context when reviewing, the unreadable MODULE.bazel.lock is
automatically generated. I think the idea is that subsequent diffs will
be more readable??

Bug: 542
Change-Id: I88f68b2602a75f58cc6d18832a956f01dc054f58
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67301
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
2024-04-26 22:19:48 +00:00