diff --git a/.bazelrc b/.bazelrc index 00fbb683bbb20..ec57c239c4ef2 100644 --- a/.bazelrc +++ b/.bazelrc @@ -14,16 +14,6 @@ build --conlyopt='-std=gnu11' # disassemblies when compilation mode is fastbuild. build --strip='never' -# Override default enablement of flags from @crt//common to control C compiler -# warnings. -build --features=-pedantic_warnings -build --host_features=-pedantic_warnings - -# Enable toolchain hardening features. -# `guards` adds `unimp` guard instructions after unconditional jumps. -build --features=guards -build --host_features=guards - # Use --config=disable_hardening to disable hardening to measure the # impact of the hardened sequences on code size. build:disable_hardening --features=-guards --copt=-DOT_DISABLE_HARDENING=1 diff --git a/MODULE.bazel b/MODULE.bazel index f9a222271fd99..761baab29827a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -143,3 +143,5 @@ use_repo( ) register_toolchains("//rules/opentitan:localtools") + +register_toolchains("//toolchain:cc_toolchain_opentitan") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 0d90a1c97edfe..a670850ba99e8 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -6,14 +6,3 @@ # //third_party/README.md first. workspace(name = "lowrisc_opentitan") - -# CRT is the Compiler Repository Toolkit. It contains the configuration for -# the windows compiler. -load("//third_party/crt:repos.bzl", "crt_repos") -crt_repos() -load("@crt//:repos.bzl", "crt_repos") -crt_repos() -load("@crt//:deps.bzl", "crt_deps") -crt_deps() -load("@crt//config:registration.bzl", "crt_register_toolchains") -crt_register_toolchains(riscv32 = True) diff --git a/rules/rv.bzl b/rules/rv.bzl index 48368231fb30b..9ea767f5321b7 100644 --- a/rules/rv.bzl +++ b/rules/rv.bzl @@ -5,7 +5,7 @@ """Helpers for transitioning to the RISC-V target.""" OPENTITAN_CPU = "@platforms//cpu:riscv32" -OPENTITAN_PLATFORM = "@crt//platforms/riscv32:opentitan" +OPENTITAN_PLATFORM = "//toolchain:opentitan_platform" # This constant holds a dictionary of per-device dependencies which are used to # generate slightly different binaries for each hardware target, including two diff --git a/util/prep-bazel-airgapped-build.sh b/util/prep-bazel-airgapped-build.sh index 45e768322a049..a93905e9a225c 100755 --- a/util/prep-bazel-airgapped-build.sh +++ b/util/prep-bazel-airgapped-build.sh @@ -143,11 +143,8 @@ if [[ ${AIRGAPPED_DIR_CONTENTS} == "ALL" || \ //... \ @lowrisc_rv32imcb_toolchain//... \ @local_config_platform//... \ - @python3_toolchains//... \ @riscv-compliance//... \ @rules_foreign_cc//toolchains/... \ - @ninja_1.11.0_linux//... \ - @cmake-3.23.2-linux-x86_64//... \ # We don't need all bitstreams in the cache, we just need the latest one so # that the cache is "initialized" and "offline" mode will work correctly. mkdir -p ${BAZEL_AIRGAPPED_DIR}/${BAZEL_BITSTREAMS_CACHEDIR}