Skip to content

Commit

Permalink
chore: add build recipe for rt entt to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelwan committed Jul 2, 2024
1 parent 20cfe75 commit 1f8bbb3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
15 changes: 10 additions & 5 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe")
load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe", "ecsact_build_recipe_bundle")
load("//bazel:copts.bzl", "copts")

package(default_visibility = ["//visibility:public"])
Expand All @@ -17,14 +17,14 @@ cc_library(

ecsact_build_recipe(
name = "ecsact_rt_entt",
codegen_plugins = {
"@ecsact_lang_cpp//cpp_header_codegen": "src",
"//rt_entt_codegen": "src",
},
srcs = [
":headers",
"//runtime:sources",
],
codegen_plugins = {
"@ecsact_lang_cpp//cpp_header_codegen": "src",
"//rt_entt_codegen": "src",
},
fetch_srcs = {
"include/entt": [
"https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entt.hpp",
Expand Down Expand Up @@ -166,3 +166,8 @@ ecsact_build_recipe(
)

exports_files(["build_recipe.yml"])

ecsact_build_recipe_bundle(
name = "ecsact_rt_entt_recipe_bundle",
recipes = ["ecsact_rt_entt"],
)
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ bazel_dep(name = "ecsact_codegen", version = "0.3.1")
bazel_dep(name = "ecsact_cli", version = "0.3.12")
bazel_dep(name = "xxhash", version = "0.8.2")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "boost.dll", version = "1.83.0.bzl.2")
bazel_dep(name = "boost.process", version = "1.83.0.bzl.2")

bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
Expand All @@ -31,11 +33,16 @@ git_override(
remote = "https://github.com/zaucy/libarchive.git",
)

ecsact = use_extension("@rules_ecsact//ecsact:extensions.bzl", "ecsact", dev_dependency = True)
ecsact.toolchain(use_ecsact_cli = True)
use_repo(ecsact, "ecsact_toolchain")

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(llvm_version = "17.0.6")
use_repo(llvm, "llvm_toolchain")

register_toolchains(
"@llvm_toolchain//:all",
"@ecsact_toolchain//:all",
dev_dependency = True,
)
5 changes: 5 additions & 0 deletions bazel/common.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ common:ci --announce_rc
common:ci --verbose_failures
common:ci --keep_going
common:ci --disk_cache=~/.cache/bazel-disk-cache

build --@boost.dll//:use_std_fs
query --@boost.dll//:use_std_fs
build --@boost.process//:use_std_fs
query --@boost.process//:use_std_fs

0 comments on commit 1f8bbb3

Please sign in to comment.