Update LLVM and switch to upstreamed Bazel BUILD. (#838)

Also removes the legacy llvm-bazel submodule that is no longer needed.
This commit is contained in:
Chandler Carruth
2021-09-20 13:15:08 -07:00
committed by GitHub
parent bc658e6923
commit fbb0aa729b
5 changed files with 11 additions and 14 deletions
+3
View File
@@ -4,3 +4,6 @@
# Carbon creates some non-standard bazel directories, so ignore them.
bazel-carbon-lang
third_party/llvm-project/libcxx/utils/google-benchmark
third_party/llvm-project/utils/bazel/examples
third_party/llvm-project/utils/bazel/llvm-project-overlay
-4
View File
@@ -2,10 +2,6 @@
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
[submodule "third_party/llvm-bazel"]
path = third_party/llvm-bazel
url = https://github.com/google/llvm-bazel.git
fetchRecurseSubmodules = false
[submodule "third_party/llvm-project"]
path = third_party/llvm-project
url = https://github.com/llvm/llvm-project.git
+7 -8
View File
@@ -93,29 +93,28 @@ configure_clang_toolchain(name = "bazel_cc_toolchain")
# LLVM libraries
###############################################################################
local_repository(
name = "llvm_bazel",
path = "third_party/llvm-bazel/llvm-bazel",
new_local_repository(
name = "llvm-raw",
build_file_content = "# empty",
path = "third_party/llvm-project",
)
load("@llvm_bazel//:configure.bzl", "llvm_configure")
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(
name = "llvm-project",
src_path = "third_party/llvm-project",
src_workspace = "@carbon//:WORKSPACE",
targets = [
"AArch64",
"X86",
],
)
load("@llvm_bazel//:terminfo.bzl", "llvm_terminfo_system")
load("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_system")
# We require successful detection and use of a system terminfo library.
llvm_terminfo_system(name = "llvm_terminfo")
load("@llvm_bazel//:zlib.bzl", "llvm_zlib_system")
load("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_system")
# We require successful detection and use of a system zlib library.
llvm_zlib_system(name = "llvm_zlib")
+1 -1
View File
@@ -14,7 +14,7 @@ namespace Carbon {
// Wraps a stream and exiting for fatal errors.
class ExitingStream {
public:
LLVM_ATTRIBUTE_NORETURN ~ExitingStream() {
[[noreturn]] ~ExitingStream() {
// Finish with a newline.
llvm::errs() << "\n";
if (treat_as_bug) {