Make the new toolchain actually usable

This commit is contained in:
2025-07-14 23:03:22 +02:00
parent 452569ef60
commit 3a28f8f5b2
107 changed files with 185 additions and 157 deletions

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-3-Clause
module(name = "asl", version = "0.5.0")
module(name = "asl", version = "0.5.1")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_license", version = "1.0.0")
@ -17,9 +17,5 @@ python.toolchain(python_version = "3.13", is_default = True)
clang_toolchain = use_extension("//bazel/clang_toolchain:config_detection.bzl", "clang_toolchain")
use_repo(clang_toolchain, "clang_toolchain")
register_toolchains(
"@clang_toolchain//:windows_x86_64_toolchain_def",
"@clang_toolchain//:linux_x86_64_toolchain_def",
"@clang_toolchain//:linux_aarch64_toolchain_def",
)
register_toolchains("@clang_toolchain//:all")

2
MODULE.bazel.lock generated
View File

@ -149,7 +149,7 @@
"//bazel/clang_toolchain:config_detection.bzl%clang_toolchain": {
"general": {
"bzlTransitiveDigest": "xXTcNvgp9bMnw/1ZKi1vOOoz139EHr8Hw3Ugd9+eos0=",
"usagesDigest": "CRr/eSLZQiKHqCq8MWfzhslrj4Mqar1310aEoa4BzJw=",
"usagesDigest": "ASGReyHtOq7zPJqUtsK0x2Dqz5wRelbfzZFVRItz3XM=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},

View File

@ -126,10 +126,11 @@ def _impl(ctx):
))
features = [
feature(name = "no_legacy_features"),
feature(name = "no_legacy_features", enabled = True),
feature(name = "opt"),
feature(name = "fastbuild"),
feature(name = "dbg"),
feature(name = "copy_dynamic_libraries_to_binary", enabled = True),
feature(
name = "default_flags",
enabled = True,

View File

@ -21,14 +21,15 @@ cc_library(
"numeric.hpp",
"utility.hpp",
],
strip_include_prefix = "/src",
srcs = [
"assert.cpp",
],
defines = select({
"//asl:debug": ["ASL_DEBUG=1"],
"//src/asl:debug": ["ASL_DEBUG=1"],
"//conditions:default": ["ASL_DEBUG=0"],
}) + select({
"//asl:optimized": ["ASL_OPTIMIZED=1"],
"//src/asl:optimized": ["ASL_OPTIMIZED=1"],
"//conditions:default": ["ASL_OPTIMIZED=0"],
}),
visibility = ["//visibility:public"],
@ -41,9 +42,9 @@ cc_library(
],
deps = [
":base",
"//asl/tests:utils",
"//asl/testing",
"//asl/types:box",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:box",
],
) for name in [
"bit",

View File

@ -11,12 +11,13 @@ cc_library(
hdrs = [
"buffer.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/memory",
"//asl/memory:allocator",
"//asl/base",
"//asl/types:span",
"//asl/hashing",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/base",
"//src/asl/types:span",
"//src/asl/hashing",
],
visibility = ["//visibility:public"],
)
@ -26,13 +27,14 @@ cc_library(
hdrs = [
"chunked_buffer.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/memory",
"//asl/memory:allocator",
"//asl/base",
"//asl/containers:buffer",
"//asl/types:array",
"//asl/types:maybe_uninit",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/base",
"//src/asl/containers:buffer",
"//src/asl/types:array",
"//src/asl/types:maybe_uninit",
],
visibility = ["//visibility:public"],
)
@ -42,12 +44,13 @@ cc_library(
hdrs = [
"hash_set.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//asl/memory:allocator",
"//asl/types:maybe_uninit",
"//asl/hashing",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/types:maybe_uninit",
"//src/asl/hashing",
],
visibility = ["//visibility:public"],
)
@ -57,11 +60,12 @@ cc_library(
hdrs = [
"hash_map.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//asl/memory:allocator",
"//asl/hashing",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/hashing",
":hash_set",
],
visibility = ["//visibility:public"],
@ -72,8 +76,9 @@ cc_library(
hdrs = [
"intrusive_list.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//src/asl/base",
],
visibility = ["//visibility:public"],
)
@ -85,9 +90,9 @@ cc_library(
],
deps = [
":%s" % name,
"//asl/tests:utils",
"//asl/testing",
"//asl/strings:string",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/strings:string",
],
) for name in [
"buffer",

View File

@ -11,16 +11,17 @@ cc_library(
hdrs = [
"format.hpp",
],
strip_include_prefix = "/src",
srcs = [
"format.cpp",
"format_float.cpp",
],
deps = [
"//asl/base",
"//asl/memory",
"//asl/strings:string_view",
"//asl/types:span",
"//asl/io:writer",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/strings:string_view",
"//src/asl/types:span",
"//src/asl/io:writer",
"//vendor/dragonbox",
],
visibility = ["//visibility:public"],
@ -33,8 +34,8 @@ cc_test(
],
deps = [
":formatting",
"//asl/tests:utils",
"//asl/testing",
"//asl/strings:string_builder",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/strings:string_builder",
],
)

View File

@ -11,12 +11,13 @@ cc_library(
hdrs = [
"index_pool.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/memory",
"//asl/memory:allocator",
"//asl/base",
"//asl/containers:chunked_buffer",
"//asl/types:option",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/base",
"//src/asl/containers:chunked_buffer",
"//src/asl/types:option",
],
visibility = ["//visibility:public"],
)
@ -26,6 +27,7 @@ cc_library(
hdrs = [
"dense_handle_pool.hpp",
],
strip_include_prefix = "/src",
deps = [
":index_pool",
],
@ -37,6 +39,7 @@ cc_library(
hdrs = [
"sparse_handle_pool.hpp",
],
strip_include_prefix = "/src",
deps = [
":index_pool",
],
@ -50,9 +53,9 @@ cc_test(
],
deps = [
":index_pool",
"//asl/hashing",
"//asl/tests:utils",
"//asl/testing",
"//src/asl/hashing",
"//src/asl/tests:utils",
"//src/asl/testing",
],
)
@ -63,8 +66,8 @@ cc_test(
],
deps = [
":dense_handle_pool",
"//asl/tests:utils",
"//asl/testing",
"//src/asl/tests:utils",
"//src/asl/testing",
],
)
@ -75,7 +78,7 @@ cc_test(
],
deps = [
":sparse_handle_pool",
"//asl/tests:utils",
"//asl/testing",
"//src/asl/tests:utils",
"//src/asl/testing",
],
)

View File

@ -11,12 +11,13 @@ cc_library(
hdrs = [
"hash.hpp",
],
strip_include_prefix = "/src",
srcs = [
"hash_cityhash.cpp",
],
deps = [
"//asl/base",
"//asl/types:span",
"//src/asl/base",
"//src/asl/types:span",
],
applicable_licenses = [
"//vendor/cityhash:license",
@ -30,15 +31,15 @@ cc_test(
"hash_tests.cpp",
],
deps = [
"//asl/base",
"//asl/tests:utils",
"//asl/testing",
"//src/asl/base",
"//src/asl/tests:utils",
"//src/asl/testing",
":hashing",
"//asl/strings:string_view",
"//asl/strings:string",
"//asl/containers:buffer",
"//asl/types:box",
"//asl/types:option",
"//asl/types:status",
"//src/asl/strings:string_view",
"//src/asl/strings:string",
"//src/asl/containers:buffer",
"//src/asl/types:box",
"//src/asl/types:option",
"//src/asl/types:status",
],
)

View File

@ -11,9 +11,10 @@ cc_library(
hdrs = [
"writer.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/types:span",
"//src/asl/base",
"//src/asl/types:span",
],
visibility = ["//visibility:public"],
)
@ -23,11 +24,12 @@ cc_library(
hdrs = [
"print.hpp",
],
strip_include_prefix = "/src",
srcs = [
"print.cpp",
],
deps = [
"//asl/formatting",
"//src/asl/formatting",
":writer",
],
visibility = ["//visibility:public"],

View File

@ -14,12 +14,13 @@ cc_library(
hdrs = [
"logging.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/containers:intrusive_list",
"//asl/formatting",
"//asl/io:print",
"//asl/strings:string_builder",
"//src/asl/base",
"//src/asl/containers:intrusive_list",
"//src/asl/formatting",
"//src/asl/io:print",
"//src/asl/strings:string_builder",
],
visibility = ["//visibility:public"],
)
@ -31,7 +32,7 @@ cc_test(
],
deps = [
":logging",
"//asl/testing",
"//src/asl/testing",
],
visibility = ["//visibility:public"],
)

View File

@ -28,6 +28,6 @@ ASL_TEST(custom_writer)
ASL_LOG_INFO("Hello");
auto sv = string_writer.as_string_view();
ASL_TEST_EXPECT(sv == "[ INFO ] asl/logging/logging_tests.cpp:28: Hello\n");
ASL_TEST_EXPECT(sv == "[ INFO ] src/asl/logging/logging_tests.cpp:28: Hello\n");
}

View File

@ -12,8 +12,9 @@ cc_library(
"layout.hpp",
"memory.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//src/asl/base",
],
visibility = ["//visibility:public"],
)
@ -23,12 +24,13 @@ cc_library(
hdrs = [
"allocator.hpp",
],
strip_include_prefix = "/src",
srcs = [
"allocator.cpp",
],
deps = [
"//asl/base",
"//asl/memory",
"//src/asl/base",
"//src/asl/memory",
],
visibility = ["//visibility:public"],
)

View File

@ -11,10 +11,11 @@ cc_library(
hdrs = [
"string_view.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//asl/types:span",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/types:span",
],
visibility = ["//visibility:public"],
)
@ -24,8 +25,9 @@ cc_library(
hdrs = [
"string.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/containers:buffer",
"//src/asl/containers:buffer",
":string_view",
],
visibility = ["//visibility:public"],
@ -36,11 +38,12 @@ cc_library(
hdrs = [
"string_builder.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/containers:buffer",
"//asl/formatting",
"//src/asl/containers:buffer",
"//src/asl/formatting",
":string",
"//asl/io:writer",
"//src/asl/io:writer",
],
visibility = ["//visibility:public"],
)
@ -50,13 +53,14 @@ cc_library(
hdrs = [
"parse_number.hpp",
],
strip_include_prefix = "/src",
srcs = [
"parse_number_float.cpp",
"parse_number.cpp",
],
deps = [
"//asl/base",
"//asl/types:status",
"//src/asl/base",
"//src/asl/types:status",
":string_view",
"//vendor/fast_float",
],
@ -73,8 +77,8 @@ cc_library(
":string_builder",
":string_view",
":parse_number",
"//asl/tests:utils",
"//asl/testing",
"//src/asl/tests:utils",
"//src/asl/testing",
],
) for name in [
"string",

View File

@ -11,8 +11,9 @@ cc_library(
hdrs = [
"atomic.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//src/asl/base",
],
visibility = ["//visibility:public"],
)

View File

@ -11,13 +11,14 @@ cc_library(
hdrs = [
"testing.hpp",
],
strip_include_prefix = "/src",
srcs = [
"testing.cpp",
],
deps = [
"//asl/base",
"//asl/formatting",
"//asl/io:print",
"//src/asl/base",
"//src/asl/formatting",
"//src/asl/io:print",
],
visibility = ["//visibility:public"],
)

View File

@ -12,9 +12,10 @@ cc_library(
"counting_allocator.hpp",
"types.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory:allocator",
"//src/asl/base",
"//src/asl/memory:allocator",
],
visibility = ["//asl:__subpackages__"],
visibility = ["//src/asl:__subpackages__"],
)

View File

@ -11,9 +11,10 @@ cc_library(
hdrs = [
"array.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/types:span",
"//src/asl/base",
"//src/asl/types:span",
],
visibility = ["//visibility:public"],
)
@ -23,11 +24,12 @@ cc_library(
hdrs = [
"box.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//asl/memory:allocator",
"//asl/hashing",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/memory:allocator",
"//src/asl/hashing",
],
visibility = ["//visibility:public"],
)
@ -37,9 +39,10 @@ cc_library(
hdrs = [
"span.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//src/asl/base",
"//src/asl/memory",
],
visibility = ["//visibility:public"],
)
@ -49,9 +52,10 @@ cc_library(
hdrs = [
"maybe_uninit.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//src/asl/base",
"//src/asl/memory",
],
visibility = ["//visibility:public"],
)
@ -61,10 +65,11 @@ cc_library(
hdrs = [
"option.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/types:maybe_uninit",
"//asl/hashing",
"//src/asl/base",
"//src/asl/types:maybe_uninit",
"//src/asl/hashing",
],
visibility = ["//visibility:public"],
)
@ -75,18 +80,19 @@ cc_library(
"status.hpp",
"status_or.hpp",
],
strip_include_prefix = "/src",
srcs = [
"status.cpp",
],
deps = [
"//asl/base",
"//asl/strings:string",
"//asl/strings:string_builder",
"//asl/formatting",
"//asl/memory",
"//asl/synchronization:atomic",
"//asl/types:maybe_uninit",
"//asl/hashing",
"//src/asl/base",
"//src/asl/strings:string",
"//src/asl/strings:string_builder",
"//src/asl/formatting",
"//src/asl/memory",
"//src/asl/synchronization:atomic",
"//src/asl/types:maybe_uninit",
"//src/asl/hashing",
],
visibility = ["//visibility:public"],
)
@ -96,10 +102,11 @@ cc_library(
hdrs = [
"function.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//asl/memory:allocator",
"//src/asl/base",
"//src/asl/memory",
"//src/asl/memory:allocator",
],
visibility = ["//visibility:public"],
)
@ -109,9 +116,10 @@ cc_library(
hdrs = [
"function_ref.hpp",
],
strip_include_prefix = "/src",
deps = [
"//asl/base",
"//asl/memory",
"//src/asl/base",
"//src/asl/memory",
],
visibility = ["//visibility:public"],
)
@ -120,9 +128,9 @@ cc_test(
name = "function_tests",
srcs = ["function_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:function",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:function",
],
)
@ -130,9 +138,9 @@ cc_test(
name = "function_ref_tests",
srcs = ["function_ref_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:function_ref",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:function_ref",
],
)
@ -140,9 +148,9 @@ cc_test(
name = "array_tests",
srcs = ["array_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:array",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:array",
],
)
@ -150,12 +158,12 @@ cc_test(
name = "box_tests",
srcs = ["box_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:box",
"//asl/types:option",
"//asl/types:maybe_uninit",
"//asl/hashing",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:box",
"//src/asl/types:option",
"//src/asl/types:maybe_uninit",
"//src/asl/hashing",
],
)
@ -163,9 +171,9 @@ cc_test(
name = "maybe_uninit_tests",
srcs = ["maybe_uninit_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:maybe_uninit",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:maybe_uninit",
],
)
@ -173,9 +181,9 @@ cc_test(
name = "span_tests",
srcs = ["span_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:span",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:span",
],
)
@ -183,9 +191,9 @@ cc_test(
name = "option_tests",
srcs = ["option_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:option",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:option",
],
)
@ -193,9 +201,9 @@ cc_test(
name = "status_tests",
srcs = ["status_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:status",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:status",
],
)
@ -203,9 +211,9 @@ cc_test(
name = "status_or_tests",
srcs = ["status_or_tests.cpp"],
deps = [
"//asl/tests:utils",
"//asl/testing",
"//asl/types:status",
"//src/asl/tests:utils",
"//src/asl/testing",
"//src/asl/types:status",
],
)

Some files were not shown because too many files have changed in this diff Show More