From 948b77accefbef3f3b26512d73738f333879b5af Mon Sep 17 00:00:00 2001 From: JP Simard Date: Wed, 10 Jul 2024 14:00:00 -0400 Subject: [PATCH] Update Bazel dependencies Signed-off-by: JP Simard --- .bazelversion | 2 +- .gitignore | 1 + BUILD | 1 + MODULE.bazel | 7 ++++--- Sources/CSwiftDemangle/BUILD | 2 +- Sources/CSwiftDemangle/include/module.modulemap | 5 +++++ 6 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 Sources/CSwiftDemangle/include/module.modulemap diff --git a/.bazelversion b/.bazelversion index 19b860c..b26a34e 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.4.0 +7.2.1 diff --git a/.gitignore b/.gitignore index 331dca8..3520b97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /DerivedData/ /.swiftpm/ bazel-* +MODULE.bazel.lock diff --git a/BUILD b/BUILD index f0886e0..890a143 100644 --- a/BUILD +++ b/BUILD @@ -3,6 +3,7 @@ load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") cc_library( name = "CIndexStore", hdrs = ["Sources/CIndexStore/include/indexstore.h"], + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], copts = ["-std=c++17"], linkstatic = True, tags = ["swift_module=CIndexStore"], diff --git a/MODULE.bazel b/MODULE.bazel index 9a7902a..21b9ce9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,9 +4,10 @@ module( compatibility_level = 1, ) -bazel_dep(name = "platforms", version = "0.0.8") -bazel_dep(name = "rules_apple", version = "3.1.1", repo_name = "build_bazel_rules_apple") -bazel_dep(name = "rules_swift", version = "1.13.0", repo_name = "build_bazel_rules_swift") +bazel_dep(name = "apple_support", version = "1.16.0") +bazel_dep(name = "platforms", version = "0.0.9") +bazel_dep(name = "rules_apple", version = "3.6.0", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "rules_swift", version = "2.1.1", repo_name = "build_bazel_rules_swift") non_module_deps = use_extension("//:repositories.bzl", "bzlmod_deps") use_repo(non_module_deps, "StaticIndexStore") diff --git a/Sources/CSwiftDemangle/BUILD b/Sources/CSwiftDemangle/BUILD index 8113daa..626db92 100644 --- a/Sources/CSwiftDemangle/BUILD +++ b/Sources/CSwiftDemangle/BUILD @@ -8,6 +8,7 @@ cc_library( hdrs = glob([ "include/**/*.h", ]), + aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"], copts = ["-std=c++17"], includes = [ "PrivateHeaders/include", @@ -16,7 +17,6 @@ cc_library( linkopts = [ "-lswiftDemangle", ], - tags = ["swift_module=CSwiftDemangle"], textual_hdrs = glob([ "**/*.def", ]), diff --git a/Sources/CSwiftDemangle/include/module.modulemap b/Sources/CSwiftDemangle/include/module.modulemap new file mode 100644 index 0000000..de9e763 --- /dev/null +++ b/Sources/CSwiftDemangle/include/module.modulemap @@ -0,0 +1,5 @@ +module CSwiftDemangle { + header "CSwiftDemangle.h" + link "CSwiftDemangle" + export * +}