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] Add support for Bazel header parsing #3276

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/workerd/api/node/buffer-string-search.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
// found in the LICENSE file.
#pragma once

#include <algorithm>
#include <cstring>
#include <kj/common.h>

#include <cstdint>

using kj::uint;

namespace workerd::api::node {
namespace stringsearch {
Expand Down Expand Up @@ -201,7 +204,7 @@ inline T AlignDown(T value, U alignment) {
}

inline uint8_t GetHighestValueByte(uint16_t character) {
return std::max(static_cast<uint8_t>(character & 0xFF), static_cast<uint8_t>(character >> 8));
return kj::max(static_cast<uint8_t>(character & 0xFF), static_cast<uint8_t>(character >> 8));
}

inline uint8_t GetHighestValueByte(uint8_t character) {
Expand Down
2 changes: 2 additions & 0 deletions src/workerd/jsg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ wd_cc_library(
"web-idl.h",
"wrappable.h",
],
# Some JSG headers can't be compiled on their own
features = ["-parse_headers"],
visibility = ["//visibility:public"],
deps = [
":exception",
Expand Down
5 changes: 5 additions & 0 deletions src/workerd/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ wd_cc_library(
":duration-exceeded-logger",
"@capnp-cpp//src/kj",
"@capnp-cpp//src/kj:kj-async",
# TODO(cleanup): Only for abortable.h, factor out
"@capnp-cpp//src/kj/compat:kj-http",
],
)

Expand Down Expand Up @@ -165,6 +167,9 @@ wd_cc_library(
name = "sentry",
hdrs = ["sentry.h"],
visibility = ["//visibility:public"],
deps = [
"@capnp-cpp//src/kj",
],
)

wd_cc_library(
Expand Down
Loading