mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 08:31:04 +01:00
Specifically this should improve linking by producing one large binary instead of one-per-directory. The inclusion of the driver hits the size issue. Separating out things which have more llvm deps has been discussed, but I'm not doing that here because I think the semantics layer will need to depend on clang for interop, and we'd lose a lot of the benefits that way. Also, having just one place to look seems simpler. Includes supporting changes to file_test infrastructure, the most significant of which is probably passing tests via file instead of a really large args thing, using a custom rule to do that. That's because dealing with the layered filegroups that allow the toolchain setup is more complicated, and this approach scales well. Combined test time is ~9s, so not sharding right now. I wasn't sure if people would prefer having the autoupdate script under testing, so I left it alone for now.
28 lines
774 B
Python
28 lines
774 B
Python
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
filegroup(
|
|
name = "testdata",
|
|
data = glob(["testdata/**/*.carbon"]),
|
|
)
|
|
|
|
cc_library(
|
|
name = "codegen",
|
|
srcs = ["codegen.cpp"],
|
|
hdrs = ["codegen.h"],
|
|
deps = [
|
|
"@llvm-project//llvm:AllTargetsAsmParsers",
|
|
"@llvm-project//llvm:AllTargetsCodeGens",
|
|
"@llvm-project//llvm:Core",
|
|
"@llvm-project//llvm:MC",
|
|
"@llvm-project//llvm:Support",
|
|
"@llvm-project//llvm:Target",
|
|
"@llvm-project//llvm:TargetParser",
|
|
],
|
|
)
|