mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 00:30:28 +00:00
Note this will need to be set per-cc_binary, but I don't think there's a good way to avoid that. I didn't try hijacking the `cc_binary` rule name because that felt a bit excessive. We probably will have a few binaries we want to run directly, but I don't think it needs to be addressed on every last one. This is part of addressing #1404
47 lines
1.0 KiB
Python
47 lines
1.0 KiB
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("//bazel/macos_malloc:env.bzl", "macos_malloc_env")
|
|
|
|
package(default_visibility = [
|
|
"//bazel/check_deps:__pkg__",
|
|
"//explorer:__subpackages__",
|
|
"//installers:__subpackages__",
|
|
])
|
|
|
|
filegroup(
|
|
name = "standard_libraries",
|
|
srcs = ["data/prelude.carbon"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "main",
|
|
srcs = ["main.cpp"],
|
|
hdrs = ["main.h"],
|
|
deps = [
|
|
"//common:error",
|
|
"//explorer/common:arena",
|
|
"//explorer/common:nonnull",
|
|
"//explorer/interpreter:exec_program",
|
|
"//explorer/syntax",
|
|
"//explorer/syntax:prelude",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "explorer",
|
|
srcs = ["main_bin.cpp"],
|
|
deps = [
|
|
":main",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
env = macos_malloc_env(),
|
|
)
|
|
|
|
py_binary(
|
|
name = "gen_rtti",
|
|
srcs = ["gen_rtti.py"],
|
|
)
|