Skip to content

Commit

Permalink
Bump Bazel to 1.0.0.
Browse files Browse the repository at this point in the history
Had to add `ar_files` and `as_files` to the toolchain rule. See:
bazelbuild/bazel#8531

Tried breaking up the filegroups, but the toolchain is too convoluted to be
worth it. Found out along the way, though, that the "cpp" `tool_path` pointed
to the wrong binary name, so fixed that.
  • Loading branch information
rpwoodbu committed Feb 28, 2022
1 parent 7208ada commit fbdaef8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
USE_BAZEL_VERSION=0.27.0
USE_BAZEL_VERSION=1.0.0
28 changes: 17 additions & 11 deletions toolchain/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,34 @@ cc_toolchain_suite(
)

filegroup(
name = "all",
name = "toolchain_files",
srcs = [
"@nacl_sdk//:pnacl_includes",
"@nacl_sdk//:pnacl_toolchain",
"pnacl_ar.sh",
"pnacl_clang++.sh",
"pnacl_clang.sh",
"pnacl_ld.sh",
"pnacl_ar.sh",
"pnacl_cpp.sh",
"pnacl_nm.sh",
"pnacl_strip.sh",
"@nacl_sdk//:pnacl_all_files",
],
)

filegroup(name = "empty")

cc_toolchain(
name = "pnacl_toolchain",
toolchain_identifier = "pnacl-toolchain",
toolchain_config = ":pnacl_toolchain_config",
all_files = ":all",
compiler_files = ":all",
dwp_files = ":all",
linker_files = ":all",
objcopy_files = ":all",
strip_files = ":all",
ar_files = ":toolchain_files",
compiler_files = ":toolchain_files",
linker_files = ":toolchain_files",
strip_files = ":toolchain_files",

# The following are no longer used, but still must exist.
all_files = ":empty",
dwp_files = ":empty",
objcopy_files = ":empty",

supports_param_files = 0,
)

Expand Down
3 changes: 3 additions & 0 deletions toolchain/pnacl_clang++.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -euo pipefail
external/nacl_sdk/toolchain/linux_pnacl/bin/pnacl-clang++ "$@"
3 changes: 0 additions & 3 deletions toolchain/pnacl_cpp.sh

This file was deleted.

2 changes: 1 addition & 1 deletion toolchain/pnacl_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _impl(ctx):
),
tool_path(
name = "cpp",
path = "pnacl_cpp.sh",
path = "pnacl_clang++.sh",
),
tool_path(
name = "gcov",
Expand Down

0 comments on commit fbdaef8

Please # to comment.