Skip to content
Merged
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
8 changes: 0 additions & 8 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,6 @@ build:macos --macos_minimum_os=13.5
# information on the flag.
build:macos --copt='-femit-dwarf-unwind=no-compact-unwind'

# Bazel doesn't allow setting flags only for a specific build mode like fastbuild, but somehow has
# a flag that does this for ObjC to set "-O0 -DDEBUG=1". Worse yet, options set by this flag cannot
# be overwritten on the command line, which confusingly makes enabling optimization there not have
# an effect. On macOS we build some ObjC as part of Dawn, set this flag to an empty string so we
# can set the right configuration flags.
# TODO(soon): File a bazel issue for the flag so we can drop this.
build:macos --experimental_objc_fastbuild_options=""

# Cross-Compilation
# Only cross-compiling on macOS from Apple Silicon to x86_64 is supported – using apple_support
# makes this much easier than on other platforms. We could define a configuration for cross-
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
run: |
# Install lld and link it to /usr/local/bin. We overwrite any existing link, which may
# exist from an older pre-installed LLVM version on the runner image.
brew update
brew install lld
sudo ln -s -f $(brew --prefix lld)/bin/ld64.lld /usr/local/bin/ld64.lld
# Enable lld identical code folding to significantly reduce binary size.
Expand Down
7 changes: 6 additions & 1 deletion build/BUILD.simdutf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ cc_library(
name = "simdutf",
srcs = ["simdutf.cpp"],
hdrs = ["simdutf.h"],
copts = ["-w"],
copts = select({
# Enable SSE4.2 extensions, this reduces code size as the fallback code path for pre-Westmere
# CPUs is no longer needed.
"@platforms//cpu:x86_64": ["-msse4.2"],
"//conditions:default": [],
}) + ["-Wno-unused-function"],
visibility = ["//visibility:public"],
)
4 changes: 3 additions & 1 deletion build/deps/build_deps.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"file_regex": "^rules_python-.*\\.tar\\.gz$"
},
{
// Needed for objc_library starting with bazel 7, used to build dawn on macOS
// Previously used to allow building dawn on macOS – while the build should succeed with the
// default Linux toolchain configuration from rules_cc apple_support is still more tailored to
// macOS.
"name": "build_bazel_apple_support",
"type": "github_release",
"owner": "bazelbuild",
Expand Down
4 changes: 0 additions & 4 deletions src/cloudflare/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ wd_ts_bundle(
internal_modules = glob(
[
"internal/*.ts",
"internal/*.js",
],
allow_empty = True,
),
modules = glob(
[
"*.ts",
"*.js",
],
allow_empty = True,
),
schema_id = "0xbcc8f57c63814006",
tsconfig_json = "tsconfig.json",
Expand Down
2 changes: 0 additions & 2 deletions src/rust/dns/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ load("//:build/wd_rust_crate.bzl", "wd_rust_crate")

wd_rust_crate(
name = "dns",
cxx_bridge_deps = [],
cxx_bridge_src = "lib.rs",
test_deps = [],
visibility = ["//visibility:public"],
deps = [
"//src/rust/cxx-integration",
Expand Down
2 changes: 0 additions & 2 deletions src/rust/net/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ load("//:build/wd_rust_crate.bzl", "wd_rust_crate")

wd_rust_crate(
name = "net",
cxx_bridge_deps = [],
cxx_bridge_src = "lib.rs",
test_deps = [],
visibility = ["//visibility:public"],
deps = [
"//src/rust/cxx-integration",
Expand Down
20 changes: 10 additions & 10 deletions src/workerd/api/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ wd_cc_library(
"crypto.c++",
"crypto-keys.c++",
"diagnostics-channel.c++",
"dns.c++",
"timers.c++",
"util.c++",
"zlib-util.c++",
],
hdrs = [
"crypto.h",
"diagnostics-channel.h",
"dns.h",
"node.h",
"timers.h",
"util.h",
"zlib-util.h",
],
implementation_deps = [
"//src/rust/cxx-integration",
"//src/rust/dns",
"//src/workerd/io",
"@capnp-cpp//src/kj/compat:kj-gzip",
],
visibility = ["//visibility:public"],
deps = [
":node-core",
"//src/node",
"//src/workerd/io",
"@capnp-cpp//src/kj/compat:kj-brotli",
"@ncrypto",
],
Expand All @@ -42,30 +40,32 @@ wd_cc_library(
srcs = [
"async-hooks.c++",
"buffer.c++",
"dns.c++",
"i18n.c++",
"module.c++",
"url.c++",
"util.c++",
],
hdrs = [
"async-hooks.h",
"buffer.h",
"buffer-string-search.h",
"dns.h",
"i18n.h",
"module.h",
"url.h",
"util.h",
],
implementation_deps = [
"//src/rust/cxx-integration",
"//src/rust/dns",
"//src/rust/net",
"@ada-url",
"@nbytes",
"@simdutf",
],
visibility = ["//visibility:public"],
deps = [
"//src/rust/cxx-integration",
"//src/rust/net",
"//src/workerd/io",
# Do not add the io target here – this target is intended for code that does not depend on
# it, move files to the main node target if needed.
"//src/workerd/io:compatibility-date_capnp",
"//src/workerd/jsg",
"//src/workerd/util:mimetype",
Expand Down
1 change: 0 additions & 1 deletion src/workerd/api/node/module.c++
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// https://opensource.org/licenses/Apache-2.0
#include "module.h"

#include <workerd/io/features.h>
#include <workerd/jsg/url.h>

namespace workerd::api::node {
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/node/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <workerd/api/node/timers.h>
#include <workerd/api/node/url.h>
#include <workerd/api/node/util.h>
#include <workerd/io/compatibility-date.h>
#include <workerd/io/compatibility-date.capnp.h>
#include <workerd/jsg/jsg.h>
#include <workerd/jsg/modules-new.h>
#include <workerd/jsg/url.h>
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ wd_cc_library(
"sqlite-metadata.h",
],
implementation_deps = [
"//src/workerd/jsg:exception",
"@sqlite3",
],
visibility = ["//visibility:public"],
deps = [
":sentry",
"//src/workerd/jsg:exception",
"@capnp-cpp//src/kj:kj-async",
],
)
Expand Down
2 changes: 2 additions & 0 deletions src/workerd/util/sqlite-kv.c++
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "sqlite-kv.h"

#include <workerd/jsg/exception.h>

#include <sqlite3.h>

namespace workerd {
Expand Down
2 changes: 0 additions & 2 deletions src/workerd/util/sqlite-kv.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "sqlite.h"

#include <workerd/jsg/exception.h>

namespace workerd {

// Small class which is used to customize certain aspects of the underlying sql operations
Expand Down