Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bazel foundation #19946

Draft
wants to merge 72 commits into
base: dev
Choose a base branch
from
Draft

build: bazel foundation #19946

wants to merge 72 commits into from

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented Jun 21, 2024

Bazel build foundation.

https://redpandadata.atlassian.net/wiki/spaces/~96716674/pages/714670307/Bazel

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.1.x
  • v23.3.x
  • v23.2.x

Release Notes

  • none

Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
Useful for passing in BOOST_TEST_MODULE=foo to add a main().

Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
The config option `--@seastar//:numa=True` didn't read very intuitively,
so changed it to `numactl`.

Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
.bazelrc Outdated Show resolved Hide resolved
bazel/thirdparty/openssl-fips.BUILD Outdated Show resolved Hide resolved
.bazelrc Outdated Show resolved Hide resolved
The second --copt is an argument to the first (-mllvm), but bazel
doesn't seem to accept various forms of combining these. So instead put
them on the same line to highlight their relationship, and rely on what
we believe to be bazel retaining the ordering.

Signed-off-by: Noah Watkins <[email protected]>
Avro .cc files include "header.h" without the "avro/" path prefix. We
want to expose the parent of "avro" so that users of the library include
with the expected "avro/header.h" path, but don't want to expose the
non-prefixed path. The way to hide this would be to add `-I<path>` to
`copts`, but such a solution is ellusive (the recommended
`-Iexternal/...` doesn't seem to work as expected with bazel modules).

Anyway, the work around in this PR stages a copy of all the headers into
a separate directory and uses that as a set of private headers added to
`srcs`.

Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
Redpanda now only uses OpenSSL (including Seastar) for crypto stuff,
which means that we do not need gnutls, nettle, gmp, or cryptopp.

Signed-off-by: Noah Watkins <[email protected]>
@emaxerrno
Copy link
Contributor

this is pretty cool.

Found by buildifier linter.

Signed-off-by: Noah Watkins <[email protected]>
The glob wasn't used because all of the files were explicitly listed.
Signed-off-by: Noah Watkins <[email protected]>
Checks for bazelisk, and in the future, could download bazelisk
automatically.

Signed-off-by: Noah Watkins <[email protected]>
This isn't ideal, but it sounds like it really only affects the ability
to cache *.pyc files. In our case, we have about a grand total of 3 or 4
files we compile with Python so I'm not sure it's worth the headache
right of figuring out a different way to deal with this.

bazelbuild/rules_python#1169

Useful for docker builds that require extra effort to use in a non-root
context.

Signed-off-by: Noah Watkins <[email protected]>
It's weird, I get it.

Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
Signed-off-by: Noah Watkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/wasm WASM Data Transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants