Skip to content

Commit

Permalink
[bazel] Bump the bazel version to fix a UI bug
Browse files Browse the repository at this point in the history
See bazelbuild/bazel#13985

Signed-off-by: Miguel Young de la Sota <[email protected]>
  • Loading branch information
mcy authored and jeoongp committed May 6, 2022
1 parent 5e3f368 commit 4ed80e1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.0
5.1.1
26 changes: 0 additions & 26 deletions rules/bugfix.bzl

This file was deleted.

8 changes: 4 additions & 4 deletions rules/cc_side_outputs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""Aspects and rules for making cc_* libraries emit more outputs."""

load("@rules_cc//cc:action_names.bzl", "ACTION_NAMES", "C_COMPILE_ACTION_NAME")
load("//rules:bugfix.bzl", "find_cc_toolchain")
load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain")
load("//rules:rv.bzl", "rv_rule")

CcSideProductInfo = provider(fields = ["files"])
Expand Down Expand Up @@ -63,7 +63,7 @@ def _cc_compile_different_output(name, target, ctx, extension, flags, process_al
)
cc_compile_ctx = cc_info.compilation_context

cc_toolchain = find_cc_toolchain(ctx)
cc_toolchain = find_cc_toolchain(ctx).cc
feature_configuration = cc_common.configure_features(
ctx = ctx,
cc_toolchain = cc_toolchain,
Expand Down Expand Up @@ -226,7 +226,7 @@ cc_asm_aspect = aspect(
)

def _cc_llvm_aspect_impl(target, ctx):
cc_toolchain = find_cc_toolchain(ctx)
cc_toolchain = find_cc_toolchain(ctx).cc
if cc_toolchain.compiler.find("clang") == -1:
return CcSideProductInfo(files = depset())
return _cc_compile_different_output("LLVMOutput", target, ctx, "ll", ["-S", "-emit-llvm"])
Expand Down Expand Up @@ -273,7 +273,7 @@ def _cc_relink_with_linkmap_aspect_impl(target, ctx):

output_file = ctx.actions.declare_file(target.label.name + ".ldmap")

cc_toolchain = find_cc_toolchain(ctx)
cc_toolchain = find_cc_toolchain(ctx).cc
feature_configuration = cc_common.configure_features(
ctx = ctx,
cc_toolchain = cc_toolchain,
Expand Down
8 changes: 3 additions & 5 deletions rules/opentitan.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# TODO(drewmacrae) this should be in rules_cc
# pending resolution of https://github.com/bazelbuild/rules_cc/issues/75
load("//rules:bugfix.bzl", "find_cc_toolchain")
load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain")
load(
"//rules:cc_side_outputs.bzl",
"rv_asm",
Expand Down Expand Up @@ -44,7 +42,7 @@ PER_DEVICE_DEPS = {
}

def _obj_transform_impl(ctx):
cc_toolchain = find_cc_toolchain(ctx)
cc_toolchain = find_cc_toolchain(ctx).cc
outputs = []
for src in ctx.files.srcs:
binary = ctx.actions.declare_file("{}.{}".format(src.basename, ctx.attr.suffix))
Expand Down Expand Up @@ -126,7 +124,7 @@ sign_bin = rv_rule(
)

def _elf_to_disassembly_impl(ctx):
cc_toolchain = find_cc_toolchain(ctx)
cc_toolchain = find_cc_toolchain(ctx).cc
outputs = []
for src in ctx.files.srcs:
disassembly = ctx.actions.declare_file("{}.elf.s".format(src.basename))
Expand Down

0 comments on commit 4ed80e1

Please sign in to comment.