diff --git a/.bazeliskrc b/.bazeliskrc deleted file mode 100644 index 897c6dfd..00000000 --- a/.bazeliskrc +++ /dev/null @@ -1,2 +0,0 @@ -BAZELISK_BASE_URL=https://static.aspect.build/aspect -USE_BAZEL_VERSION=aspect/2025.06.52 diff --git a/.bazelrc b/.bazelrc deleted file mode 100644 index e59f2812..00000000 --- a/.bazelrc +++ /dev/null @@ -1,49 +0,0 @@ -# Make Bazel print out all options from rc files -common --announce_rc - -# Verbose test output -common --test_summary=detailed -# Stream test results to stdout -common --test_output=streamed - -# We use 23 standard -build:linux --cxxopt=-std=c++23 -# Include: source directory -build:linux --cxxopt=-iquote --cxxopt=src -# Essential warnings -build:linux --cxxopt=-Wall -# Extra warnings -build:linux --cxxopt=-Wextra -# TODO: document the rest -build:linux --cxxopt=-Wno-pointer-arith -build:linux --cxxopt=-Wno-unused-const-variable -build:linux --cxxopt=-Wno-missing-field-initializers -build:linux --cxxopt=-Wno-stringop-overflow - -# LTO, see: https://gcc.gnu.org/wiki/LinkTimeOptimization -# TODO: make conan build all dependencies with LTO - right now triggers "final link failed: bad value" errors -# build:linux --cxxopt=-flto -# build:linux --linkopt=-flto - -# Optimize for native (host) architecture -# Be warned - might break distribution builds -build:linux-fragile --config=linux -build:linux-fragile --cxxopt=-march=native - -# Treat warnings as errors should be enabled optionally -build:linux-strict --config=linux -build:linux-strict --cxxopt=-Werror - -# --- Build configurations --- -# Linux, Debug -build:linux-dbg --compilation_mode dbg -build:linux-dbg --config=linux-fragile -build:linux-dbg --cxxopt=-ggdb3 -# Linux, Release -build:linux-opt --compilation_mode opt -build:linux-opt --config=linux -build:linux-opt --cxxopt=-O3 -# ---------------------------- - -# Distro-specific configurations -# ... diff --git a/.bazelversion b/.bazelversion deleted file mode 100644 index c1e64b1f..00000000 --- a/.bazelversion +++ /dev/null @@ -1,4 +0,0 @@ -8.2.1 -# The first line of this file is used by Bazelisk and Bazel to be sure -# the right version of Bazel is used to build and test this repo. -# This also defines which version is used on CI. diff --git a/.gitmodules b/.gitmodules index 953052d6..d79208da 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,3 @@ -[submodule "dist/HPool"] - path = dist/HPool - url = https://github.com/randommfs/HPool -[submodule "foreign/eternal"] - path = foreign/eternal - url = https://github.com/mapbox/eternal [submodule "foreign/HPool"] path = foreign/HPool - url = https://github.com/randommfs/HPool -[submodule "foreign/libbacktrace"] - path = foreign/libbacktrace - url = https://github.com/ianlancetaylor/libbacktrace + url = https://github.com/randommfs/HPool \ No newline at end of file diff --git a/BUILD.bazel b/BUILD.bazel deleted file mode 100644 index c191ce24..00000000 --- a/BUILD.bazel +++ /dev/null @@ -1,50 +0,0 @@ -"Top level build configuration, use for tooling only" - -load("@aspect_rules_lint//format:defs.bzl", "format_multirun") -load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands") - -package( - default_visibility = [ - "//visibility:private", - ], -) - -config_setting( - name = "linux", - constraint_values = ["@platforms//os:linux"], -) - -refresh_compile_commands( - name = "refresh_compile_commands", - exclude_external_sources = True, - targets = { - "//src/...": "--config=linux-dbg", - "//tests/...": "--config=linux-dbg", - }, - # I hope they will support this at some point - # targets = select( - # { - # ':linux': { - # '//src/...': '--config=linux-dbg', - # '//tests/...': '--config=linux-dbg' - # } - # }, - # no_match_error = 'Could not determine host OS toolchain flags, running this target is pointless' - # ) -) - -exports_files( - [ - ".ruff.toml", - ".clang-tidy", - ], - visibility = ["//visibility:public"], -) - -format_multirun( - name = "format", - cc = "@llvm_toolchain//:bin/clang-format", - print_command = True, - python = "@aspect_rules_lint//format:ruff", - starlark = "@buildifier_prebuilt//:buildifier", -) diff --git a/MODULE.bazel b/MODULE.bazel deleted file mode 100644 index 7ecc8417..00000000 --- a/MODULE.bazel +++ /dev/null @@ -1,68 +0,0 @@ -"HyperCPU" - -module( - name = "hyper-cpu", - version = "0.5.2", - compatibility_level = 1, -) - -######################### -# Starlark dependencies # -######################### - -# Rules for building cpp objects: shared & static libs, binaries etc. -bazel_dep(name = "rules_cc", version = "0.1.2") - -# Bazel skylib: core library for starlark. -bazel_dep(name = "bazel_skylib", version = "1.7.1") - -# Bazel helpers to include other projects. -bazel_dep(name = "rules_foreign_cc", version = "0.14.0") - -# These rules provide hooks for compile_commands.json generation - useful for clangd. -bazel_dep(name = "hedron_compile_commands", dev_dependency = True) - -# Rules for creating tarballs with our precious binaries. -bazel_dep(name = "rules_pkg", version = "1.1.0", dev_dependency = True) - -# Rules to constraint buildsystem. -bazel_dep(name = "platforms", version = "1.0.0", dev_dependency = True) - -# For formatting/linting. -bazel_dep(name = "aspect_rules_lint", version = "1.5.3", dev_dependency = True) - -# Formal bazel itself. -bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") - -# Bazel deps are normally pulled from BCR (registry), but sometimes -# it is needed to fetch them elsewhere. This command does exactly that. -git_override( - module_name = "hedron_compile_commands", - commit = "abb61a688167623088f8768cc9264798df6a9d10", - remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git", -) - -# We use this for static analysis (and formatting). -bazel_dep(name = "toolchains_llvm", version = "1.4.0", dev_dependency = True) - -llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") -llvm.toolchain( - llvm_version = "19.1.7", -) -use_repo(llvm, "llvm_toolchain") - -################################ -# Actual HyperCPU dependencies # -################################ - -# These come from Google. -bazel_dep(name = "abseil-cpp", version = "20250512.1") -bazel_dep(name = "re2", version = "2024-07-02.bcr.1") -bazel_dep(name = "googletest", version = "1.17.0") -bazel_dep(name = "google_benchmark", version = "1.9.1") - -# These do not come from Google but we love them still. -bazel_dep(name = "fmt", version = "11.2.0") -bazel_dep(name = "spdlog", version = "1.15.3") -bazel_dep(name = "libunwind", version = "1.8.1") -bazel_dep(name = "argparse", version = "3.2.0") diff --git a/foreign/BUILD.bazel b/foreign/BUILD.bazel deleted file mode 100644 index 0cedd4a3..00000000 --- a/foreign/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -"Foreign deps" - -# Here we have projects that we rely on, but -# cannot fetch from registry. - -load("@rules_cc//cc:defs.bzl", "cc_library") - -package( - default_visibility = [ - "//:__subpackages__", - ], -) - -cc_library( - name = "hpool", - hdrs = ["HPool/hpool.hpp"], - includes = ["HPool"], -) - -cc_library( - name = "eternal", - hdrs = ["eternal/include/mapbox/eternal.hpp"], - includes = ["eternal/include"], -) diff --git a/foreign/eternal b/foreign/eternal deleted file mode 160000 index dd2f5b9f..00000000 --- a/foreign/eternal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd2f5b9ff38fcd36b59efd9d289127fa73efc6cb diff --git a/src/Assembler/BUILD.bazel b/src/Assembler/BUILD.bazel deleted file mode 100644 index 8c9df9f2..00000000 --- a/src/Assembler/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") - -cc_library( - name = "assembler_core", - srcs = glob( - ["**/*.cpp"], - exclude = ["Main.cpp"], - ), - hdrs = glob(["**/*.hpp"]), - visibility = ["//visibility:public"], - deps = [ - "//foreign:eternal", - "//foreign:hpool", - "//src/Common:hcpu_common", - "//src/PCH:pch_cstd", - "//src/Pog:pog", - "@fmt", - "@spdlog", - ], -) - -cc_binary( - name = "hcasm", - srcs = ["Main.cpp"], - visibility = ["//visibility:public"], - deps = [ - ":assembler_core", - "@argparse", - "@re2", - ], -) diff --git a/src/BUILD.bazel b/src/BUILD.bazel deleted file mode 100644 index e69de29b..00000000 diff --git a/src/BacktraceProvider/BUILD.bazel b/src/BacktraceProvider/BUILD.bazel deleted file mode 100644 index c8fe5ef1..00000000 --- a/src/BacktraceProvider/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "backtrace_provider", - srcs = ["BacktraceProvider.cpp"], - hdrs = ["BacktraceProvider.hpp"], - visibility = ["//visibility:public"], - deps = [ - "//src/PCH:pch_cstd", - "@fmt", - "@libunwind", - ], -) diff --git a/src/Common/BUILD.bazel b/src/Common/BUILD.bazel deleted file mode 100644 index bcbca553..00000000 --- a/src/Common/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") - -cc_library( - name = "hcpu_common", - srcs = glob( - ["**/*.cpp"], - allow_empty = True, - ), - hdrs = glob(["**/*.hpp"]), - strip_include_prefix = "/src", - visibility = ["//visibility:public"], - deps = [ - "//src/PCH:pch_cstd", - "@spdlog", - ], -) diff --git a/src/Emulator/BUILD.bazel b/src/Emulator/BUILD.bazel deleted file mode 100644 index 80e4da5f..00000000 --- a/src/Emulator/BUILD.bazel +++ /dev/null @@ -1,28 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") - -cc_library( - name = "emulator_core", - srcs = glob( - ["**/*.cpp"], - exclude = ["Main.cpp"], - ), - hdrs = glob(["**/*.hpp"]), - visibility = ["//visibility:public"], - deps = [ - "//foreign:eternal", - "//src/Assembler:assembler_core", - "//src/PCH:pch_cstd", - "//src/Pog:pog", - "@fmt", - ], -) - -cc_binary( - name = "hcemul", - srcs = ["Main.cpp"], - visibility = ["//visibility:public"], - deps = [ - ":emulator_core", - "@argparse", - ], -) diff --git a/src/PCH/BUILD.bazel b/src/PCH/BUILD.bazel deleted file mode 100644 index 123b0274..00000000 --- a/src/PCH/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//tools/bazel:pch.bzl", "precompiled_headers") - -precompiled_headers( - name = "pch_cstd", - main = "CStd.hpp", - visibility = ["//visibility:public"], -) diff --git a/src/Pog/BUILD.bazel b/src/Pog/BUILD.bazel deleted file mode 100644 index 9143bf5b..00000000 --- a/src/Pog/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") -load("//tools/bazel:pch.bzl", "precompiled_headers") - -cc_library( - name = "pog_core", - hdrs = glob( - ["**/*.hpp"], - exclude = ["Pog.hpp"], - ), - visibility = ["//visibility:private"], -) - -precompiled_headers( - name = "pog", - main = "Pog.hpp", - visibility = ["//visibility:public"], - deps = [ - ":pog_core", - "@fmt", - "@re2", - ], -) diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel deleted file mode 100644 index 35ba797f..00000000 --- a/tests/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_library") -load("//tools/bazel:pch.bzl", "precompiled_headers") - -package( - default_visibility = [ - "//tests:__subpackages__", - ], -) - -precompiled_headers( - name = "pch_gtest", - main = "gtest.hpp", - deps = [ - "@googletest//:gtest", - ], -) - -cc_library( - name = "test_fixtures", - hdrs = ["fixtures.hpp"], - deps = [ - "//src/PCH:pch_cstd", - ], -) diff --git a/tests/Integration/BUILD.bazel b/tests/Integration/BUILD.bazel deleted file mode 100644 index b21f54ff..00000000 --- a/tests/Integration/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") - -cc_library( - name = "integration_tests_lib", - srcs = glob(["**/*.cpp"]), - deps = [ - "//src/Assembler:assembler_core", - "//src/Emulator:emulator_core", - "//src/PCH:pch_cstd", - "//tests:pch_gtest", - "//tests:test_fixtures", - ], - alwayslink = True, -) - -cc_test( - name = "integration-test", - deps = [ - ":integration_tests_lib", - "@googletest//:gtest_main", - ], -) - -cc_binary( - name = "packaged-integration-test", - visibility = ["//tools/packaging:__pkg__"], - deps = [ - ":integration_tests_lib", - "@googletest//:gtest_main", - ], -) diff --git a/tests/Modular/BUILD.bazel b/tests/Modular/BUILD.bazel deleted file mode 100644 index 2a74c439..00000000 --- a/tests/Modular/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") - -cc_library( - name = "modular_tests_lib", - srcs = glob(["**/*.cpp"]), - deps = [ - "//src/Assembler:assembler_core", - "//src/Emulator:emulator_core", - "//src/PCH:pch_cstd", - "//tests:pch_gtest", - "//tests:test_fixtures", - ], - alwayslink = True, -) - -cc_test( - name = "modular-test", - deps = [ - ":modular_tests_lib", - "@googletest//:gtest_main", - ], -) - -cc_binary( - name = "packaged-modular-test", - visibility = ["//tools/packaging:__pkg__"], - deps = [ - ":modular_tests_lib", - "@googletest//:gtest_main", - ], -) diff --git a/tests/Pog/BUILD.bazel b/tests/Pog/BUILD.bazel deleted file mode 100644 index ea09cdfd..00000000 --- a/tests/Pog/BUILD.bazel +++ /dev/null @@ -1,29 +0,0 @@ -load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") - -cc_library( - name = "pog_tests_lib", - srcs = glob(["**/*.cpp"]), - deps = [ - "//src/PCH:pch_cstd", - "//src/Pog:pog", - "//tests:pch_gtest", - ], - alwayslink = True, -) - -cc_test( - name = "test-pog", - deps = [ - ":pog_tests_lib", - "@googletest//:gtest_main", - ], -) - -cc_binary( - name = "packaged-test-pog", - visibility = ["//tools/packaging:__pkg__"], - deps = [ - ":pog_tests_lib", - "@googletest//:gtest_main", - ], -) diff --git a/tools/bazel/BUILD.bazel b/tools/bazel/BUILD.bazel deleted file mode 100644 index 488453fb..00000000 --- a/tools/bazel/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -"Common macros, rules etc. used by HyperCPU" - -load("@bazel_skylib//rules:native_binary.bzl", "native_binary") - -native_binary( - name = "clang_tidy", - src = "@llvm_toolchain//:bin/clang-tidy", - out = "clang_tidy", -) diff --git a/tools/bazel/lint.bzl b/tools/bazel/lint.bzl deleted file mode 100644 index e499a5c2..00000000 --- a/tools/bazel/lint.bzl +++ /dev/null @@ -1,18 +0,0 @@ -"Aspects for linting" - -load("@aspect_rules_lint//lint:clang_tidy.bzl", "lint_clang_tidy_aspect") -load("@aspect_rules_lint//lint:ruff.bzl", "lint_ruff_aspect") - -ruff = lint_ruff_aspect( - binary = Label("@aspect_rules_lint//format:ruff"), - configs = [ - Label("@//:.ruff.toml"), - ], -) - -clang_tidy = lint_clang_tidy_aspect( - binary = Label("//tools/bazel:clang_tidy"), - configs = [ - Label("@//:.clang-tidy"), - ], -) diff --git a/tools/bazel/pch.bzl b/tools/bazel/pch.bzl deleted file mode 100644 index 3f141405..00000000 --- a/tools/bazel/pch.bzl +++ /dev/null @@ -1,140 +0,0 @@ -"Precompile Headers. Note: this is quite experimental." - -load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") -load("@rules_cc//cc:action_names.bzl", "CPP_COMPILE_ACTION_NAME") - -def _feature_conf(ctx, cc_toolchain): - return cc_common.configure_features(ctx = ctx, cc_toolchain = cc_toolchain) - -def _global_flags(ctx, cc_toolchain, feature_configuration): - compile_variables = cc_common.create_compile_variables( - feature_configuration = feature_configuration, - cc_toolchain = cc_toolchain, - user_compile_flags = ctx.fragments.cpp.cxxopts + ctx.fragments.cpp.copts, - ) - flags = cc_common.get_memory_inefficient_command_line( - feature_configuration = feature_configuration, - action_name = CPP_COMPILE_ACTION_NAME, - variables = compile_variables, - ) - if cc_toolchain.needs_pic_for_dynamic_libraries(feature_configuration = feature_configuration): - flags = flags + ["-fPIC"] - return flags - -def _precompiled_headers_impl(ctx): - files = ctx.attr.main.files.to_list() - if len(files) != 1: - fail("expected a single aggregated header to compile, got: {}".format(files)) - main_file = files[0] - - cc_toolchain = find_cpp_toolchain(ctx) - feature_configuration = _feature_conf(ctx, cc_toolchain) - - dep_ctxs = [] - for d in ctx.attr.deps: - if CcInfo in d: - dep_ctxs.append(d[CcInfo].compilation_context) - else: - fail("dep arguments must provide CcInfo (e.g. cc_library): {}".format(d)) - - merged_ctx = cc_common.merge_compilation_contexts( - compilation_contexts = dep_ctxs, - ) - - args = ctx.actions.args() - args.add_all(_global_flags(ctx, cc_toolchain, feature_configuration)) - - for define in merged_ctx.defines.to_list(): - args.add("-D" + define) - for define in getattr(merged_ctx, "local_defines", depset()).to_list(): - args.add("-D" + define) - - args.add_all(merged_ctx.system_includes.to_list(), before_each = "-isystem") - args.add_all(merged_ctx.includes.to_list() + merged_ctx.quote_includes.to_list(), before_each = "-I") - - args.add_all(ctx.attr.copts) - args.add("-xc++-header") - args.add(main_file.path) - - output = ctx.actions.declare_file("{}.pch".format(main_file.basename)) - args.add("-o", output.path) - - args.add("-MD") - args.add("-MF", "/dev/null") - - inputs = depset( - direct = [main_file], - transitive = [merged_ctx.headers, cc_toolchain.all_files], - ) - - compiler_tool = cc_common.get_tool_for_action( - feature_configuration = feature_configuration, - action_name = CPP_COMPILE_ACTION_NAME, - ) or cc_toolchain.compiler_executable - - ctx.actions.run( - inputs = inputs, - outputs = [output], - executable = compiler_tool, - arguments = [args], - mnemonic = "PrecompileHdrs", - progress_message = "Pre-compiling header: {}".format(main_file.basename), - ) - - pch_ctx = cc_common.create_compilation_context( - headers = depset(direct = [output, main_file]), - includes = depset(direct = [output.dirname]), - ) - - merged_headers = depset(transitive = [merged_ctx.headers, pch_ctx.headers]) - merged_includes = depset(transitive = [ - merged_ctx.includes, - merged_ctx.quote_includes, - pch_ctx.includes, - ]) - - merged_quote_includes = depset(transitive = [ - merged_ctx.quote_includes, - ]) - - merged_system_includes = depset(transitive = [ - merged_ctx.system_includes, - ]) - - merged_out_compilation_ctx = cc_common.create_compilation_context( - headers = merged_headers, - includes = merged_includes, - quote_includes = merged_quote_includes, - system_includes = merged_system_includes, - defines = merged_ctx.defines, - local_defines = getattr(merged_ctx, "local_defines", depset()), - framework_includes = getattr(merged_ctx, "framework_includes", depset()), - ) - - dep_cc_infos = [d[CcInfo] for d in ctx.attr.deps if CcInfo in d] - merged_linking_ctx = cc_common.merge_linking_contexts( - linking_contexts = [ - i.linking_context - for i in dep_cc_infos - if hasattr(i, "linking_context") and i.linking_context - ], - ) - - return [CcInfo( - compilation_context = merged_out_compilation_ctx, - linking_context = merged_linking_ctx, - )] - -precompiled_headers = rule( - implementation = _precompiled_headers_impl, - attrs = { - "main": attr.label(allow_files = True, mandatory = True), - "deps": attr.label_list(), - "copts": attr.string_list(), - "_cc_toolchain": attr.label( - default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"), - ), - }, - toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], - fragments = ["cpp"], -) diff --git a/tools/packaging/BUILD.bazel b/tools/packaging/BUILD.bazel deleted file mode 100644 index 95a4af4e..00000000 --- a/tools/packaging/BUILD.bazel +++ /dev/null @@ -1,55 +0,0 @@ -load("@rules_pkg//:pkg.bzl", "pkg_tar") -load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") -load("//tools/packaging:vars.bzl", "pkg_vars") - -config_setting( - name = "linux", - constraint_values = ["@platforms//os:linux"], -) - -pkg_files( - name = "dist_files", - srcs = [ - "//src/Assembler:hcasm", - "//src/Emulator:hcemul", - ], - attributes = pkg_attributes( - mode = "755", - ), - prefix = "usr/bin", -) - -pkg_files( - name = "dist_tests", - srcs = [ - "//tests/Integration:packaged-integration-test", - "//tests/Modular:packaged-modular-test", - "//tests/Pog:packaged-test-pog", - ], - attributes = pkg_attributes( - mode = "755", - ), - prefix = "opt/hcpu/tests", -) - -pkg_vars( - name = "dist_vars", - platform = select({ - ":linux": "linux", - "//conditions:default": "unknown", - }), - product_name = "hyper-cpu", - version = module_version(), -) - -pkg_tar( - name = "hcpu", - srcs = [ - ":dist_files", - ":dist_tests", - ], - extension = "tar.gz", - include_runfiles = True, - package_file_name = "{product_name}-{version}-{compiler}.tar.gz", - package_variables = ":dist_vars", -) diff --git a/tools/packaging/vars.bzl b/tools/packaging/vars.bzl deleted file mode 100644 index d79095be..00000000 --- a/tools/packaging/vars.bzl +++ /dev/null @@ -1,34 +0,0 @@ -"Find out current build info to fill in package name" - -load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain") -load("@rules_pkg//pkg:providers.bzl", "PackageVariablesInfo") - -def _impl(ctx): - values = {} - - # These are set from context - leave them configurable. - values["version"] = ctx.attr.version - values["platform"] = ctx.attr.platform - values["product_name"] = ctx.attr.product_name - - # Some things we can fetch from current toolchain. - tc = find_cc_toolchain(ctx) - values["compiler"] = tc.compiler_executable.rsplit("/", 1)[-1] - - return PackageVariablesInfo(values = values) - -pkg_vars = rule( - implementation = _impl, - attrs = { - "product_name": attr.string( - doc = "Placeholder for our final product name.", - ), - "platform": attr.string( - doc = "Placeholder for our release platform", - ), - "version": attr.string( - doc = "Placeholder for our release version.", - ), - }, - toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], -)