blob: ff18893581d11cc81b5959b30b35a66dc87d3f63 [file] [log] [blame]
Chris Frantz8d799de2022-04-04 11:19:15 -07001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
Miguel Young de la Sotaec9c6cd2022-04-08 15:16:22 -04005# If you're planning to add to this file, please read
6# //third_party/README.md first.
7
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -04008workspace(name = "lowrisc_opentitan")
Chris Frantze7454162021-08-25 14:43:05 -07009
Timothy Trippel41b46fe2022-08-17 23:01:25 -070010# CRT is the Compiler Repository Toolkit. It contains the configuration for
11# the windows compiler.
12load("//third_party/crt:repos.bzl", "crt_repos")
13crt_repos()
14load("@crt//:repos.bzl", "crt_repos")
15crt_repos()
16load("@crt//:deps.bzl", "crt_deps")
17crt_deps()
18load("@crt//config:registration.bzl", "crt_register_toolchains")
19crt_register_toolchains(riscv32 = True)
Drew Macrae78a58872021-09-07 20:52:19 +000020
Chris Frantz07ece742022-07-28 16:08:37 -070021# Tools for release automation
22load("//third_party/github:repos.bzl", "github_tools_repos")
23github_tools_repos()
24
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040025# Go Toolchain
26load("//third_party/go:repos.bzl", "go_repos")
27go_repos()
28load("//third_party/go:deps.bzl", "go_deps")
29go_deps()
Drew Macrae78a58872021-09-07 20:52:19 +000030
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040031# Python Toolchain + PIP Dependencies
32load("//third_party/python:repos.bzl", "python_repos")
33python_repos()
34load("//third_party/python:deps.bzl", "python_deps")
35python_deps()
36load("//third_party/python:pip.bzl", "pip_deps")
37pip_deps()
Chris Frantze7454162021-08-25 14:43:05 -070038
Chris Frantz3a813b82022-07-28 10:32:42 -070039# Google/Bazel dependencies. This needs to be after Python initialization
40# so that our preferred python configuration takes precedence.
41load("//third_party/google:repos.bzl", "google_repos")
42google_repos()
43load("//third_party/google:deps.bzl", "google_deps")
44google_deps()
45
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040046# Rust Toolchain + crates.io Dependencies
47load("//third_party/rust:repos.bzl", "rust_repos")
48rust_repos()
49load("//third_party/rust:deps.bzl", "rust_deps")
50rust_deps()
Drew Macrae78a58872021-09-07 20:52:19 +000051
Chris Frantzc69200d2022-05-04 09:36:57 -070052# Cargo Raze dependencies
53load("//third_party/cargo_raze:repos.bzl", "raze_repos")
54raze_repos()
55load("//third_party/cargo_raze:deps.bzl", "raze_deps")
56raze_deps()
57# The raze instructions would have us call `cargo_raze_transitive_deps`, but that
58# wants to re-instantiate rules_rust and mess up our rust configuration.
59# Instead, we perform the single other action that transitive_deps would perform:
60# load and instantiate `rules_foreign_cc_dependencies`.
61#load("@cargo_raze//:transitive_deps.bzl", "cargo_raze_transitive_deps")
62#cargo_raze_transitive_deps()
63load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
64rules_foreign_cc_dependencies()
65
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040066# Protobuf Toolchain
67load("//third_party/protobuf:repos.bzl", "protobuf_repos")
68protobuf_repos()
69load("//third_party/protobuf:deps.bzl", "protobuf_deps")
Timothy Trippel65b77b92022-03-24 15:52:25 -070070protobuf_deps()
71
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040072# Various linters
73load("//third_party/lint:repos.bzl", "lint_repos")
74lint_repos()
75load("//third_party/lint:deps.bzl", "lint_deps")
76lint_deps()
Timothy Trippel65b77b92022-03-24 15:52:25 -070077
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040078# FreeRTOS; used by the OTTF
79load("//third_party/freertos:repos.bzl", "freertos_repos")
80freertos_repos()
Chris Frantz903bcec2021-11-09 16:43:29 -080081
Miguel Young de la Sota98cfa222022-04-06 15:31:06 -040082# RISC-V Compliance Tests
83load("//third_party/riscv-compliance:repos.bzl", "riscv_compliance_repos")
84riscv_compliance_repos()
Chris Frantz74b07402022-04-07 18:07:34 -070085
86# Bitstreams from https://storage.googleapis.com/opentitan-bitstreams/
87load("//rules:bitstreams.bzl", "bitstreams_repo")
88bitstreams_repo(name = "bitstreams")
Chris Frantz74f90952022-04-18 20:57:01 -070089
Chris Frantz6d7c82a2022-05-12 14:20:17 -070090# Setup for linking in external test hooks.
91load("//rules:hooks_setup.bzl", "hooks_setup")
92hooks_setup(
93 name = "hooks_setup",
94 dummy = "sw/device/tests/closed_source",
95)
96
97# Declare the external test_hooks repository.
98load("@hooks_setup//:repos.bzl", "hooks_repo")
Timothy Trippeldf881c02022-05-25 15:48:12 -070099hooks_repo(name = "manufacturer_test_hooks")
Chris Frantz6d7c82a2022-05-12 14:20:17 -0700100
Chris Frantz74f90952022-04-18 20:57:01 -0700101# The nonhermetic_repo imports environment variables needed to run vivado.
102load("//rules:nonhermetic.bzl", "nonhermetic_repo")
103nonhermetic_repo(name = "nonhermetic")