diff --git a/core/BUILD b/core/BUILD index ad635c024239..207f5f537f4e 100644 --- a/core/BUILD +++ b/core/BUILD @@ -13,7 +13,7 @@ filegroup( ) # A list of prelude inputs. -# This is consumed by //toolchain/install:install_paths. +# This is consumed by //toolchain/base:install_paths. manifest( name = "prelude_manifest.txt", srcs = [":prelude_files"], diff --git a/testing/base/BUILD b/testing/base/BUILD index 305c8b28a0b9..7f907df3a050 100644 --- a/testing/base/BUILD +++ b/testing/base/BUILD @@ -82,8 +82,8 @@ cc_test( ":source_gen_lib", "//common:all_llvm_targets", "//common:set", + "//toolchain/base:install_paths_test_helpers", "//toolchain/driver", - "//toolchain/install:install_paths_test_helpers", "@googletest//:gtest", "@llvm-project//llvm:Support", ], diff --git a/testing/base/source_gen_test.cpp b/testing/base/source_gen_test.cpp index 1cd22c576b58..f03e470e363a 100644 --- a/testing/base/source_gen_test.cpp +++ b/testing/base/source_gen_test.cpp @@ -11,8 +11,8 @@ #include "common/set.h" #include "testing/base/global_exe_path.h" +#include "toolchain/base/install_paths_test_helpers.h" #include "toolchain/driver/driver.h" -#include "toolchain/install/install_paths_test_helpers.h" namespace Carbon::Testing { namespace { diff --git a/third_party/llvm/BUILD b/third_party/llvm/BUILD index e8f09dd68003..2cceeadd8e2d 100644 --- a/third_party/llvm/BUILD +++ b/third_party/llvm/BUILD @@ -11,7 +11,7 @@ cc_library( visibility = ["//visibility:public"], deps = [ "//common:check", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@llvm-project//clang:basic", "@llvm-project//clang:codegen", "@llvm-project//clang:frontend", diff --git a/third_party/llvm/clang_cc1.cpp b/third_party/llvm/clang_cc1.cpp index b32fd3b33daa..bb15434dd48d 100644 --- a/third_party/llvm/clang_cc1.cpp +++ b/third_party/llvm/clang_cc1.cpp @@ -31,7 +31,7 @@ #include "llvm/Support/TimeProfiler.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" namespace Carbon { diff --git a/third_party/llvm/clang_cc1.h b/third_party/llvm/clang_cc1.h index 1b1e101e05da..3368f35cbe2b 100644 --- a/third_party/llvm/clang_cc1.h +++ b/third_party/llvm/clang_cc1.h @@ -8,7 +8,7 @@ #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/VirtualFileSystem.h" -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" namespace Carbon { diff --git a/toolchain/base/BUILD b/toolchain/base/BUILD index 67015a585c5d..20ee253e74e4 100644 --- a/toolchain/base/BUILD +++ b/toolchain/base/BUILD @@ -2,7 +2,7 @@ # Exceptions. See /LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -load("//bazel/cc_rules:defs.bzl", "cc_library", "cc_test") +load("//bazel/cc_rules:defs.bzl", "cc_binary", "cc_library", "cc_test") load("llvm_tools.bzl", "LLVM_MAIN_TOOLS", "generate_llvm_tools_def") load("runtime_sources.bzl", "generate_runtime_sources_cc_library") @@ -90,6 +90,66 @@ cc_library( ], ) +# A library for computing install paths for the toolchain. Note that this +# library does *not* include the data itself, as that would form a dependency +# cycle. Each part of the toolchain should add the narrow data file groups to +# their data dependencies, and then use this library to locate them. +cc_library( + name = "install_paths", + srcs = ["install_paths.cpp"], + hdrs = ["install_paths.h"], + deps = [ + ":llvm_tools", + "//common:check", + "//common:error", + "//common:filesystem", + "@bazel_tools//tools/cpp/runfiles", + "@llvm-project//clang:basic", + "@llvm-project//llvm:Support", + ], +) + +cc_binary( + name = "test_binary", + testonly = 1, + srcs = ["test_binary.cpp"], + data = ["//toolchain/install:install_data"], +) + +cc_test( + name = "install_paths_test", + size = "small", + srcs = ["install_paths_test.cpp"], + data = [ + ":test_binary", + "//toolchain/install:install_data", + ], + deps = [ + ":install_paths", + "//common:check", + "//common:error_test_helpers", + "//common:filesystem", + "//common:ostream", + "//testing/base:global_exe_path", + "//testing/base:gtest_main", + "@bazel_tools//tools/cpp/runfiles", + "@googletest//:gtest", + "@llvm-project//llvm:Support", + ], +) + +cc_library( + name = "install_paths_test_helpers", + testonly = 1, + srcs = ["install_paths_test_helpers.cpp"], + hdrs = ["install_paths_test_helpers.h"], + deps = [ + ":install_paths", + "//testing/base:global_exe_path", + "@llvm-project//llvm:Support", + ], +) + cc_library( name = "kind_switch", hdrs = ["kind_switch.h"], diff --git a/toolchain/install/install_paths.cpp b/toolchain/base/install_paths.cpp similarity index 99% rename from toolchain/install/install_paths.cpp rename to toolchain/base/install_paths.cpp index ead703431cd7..6ab88fd0d46a 100644 --- a/toolchain/install/install_paths.cpp +++ b/toolchain/base/install_paths.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" #include #include diff --git a/toolchain/install/install_paths.h b/toolchain/base/install_paths.h similarity index 98% rename from toolchain/install/install_paths.h rename to toolchain/base/install_paths.h index 1ba1c1e49ca3..86c153163833 100644 --- a/toolchain/install/install_paths.h +++ b/toolchain/base/install_paths.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_H_ -#define CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_H_ +#ifndef CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_H_ +#define CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_H_ #include @@ -183,4 +183,4 @@ class InstallPaths { } // namespace Carbon -#endif // CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_H_ +#endif // CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_H_ diff --git a/toolchain/install/install_paths_test.cpp b/toolchain/base/install_paths_test.cpp similarity index 97% rename from toolchain/install/install_paths_test.cpp rename to toolchain/base/install_paths_test.cpp index fa58a00c13fc..27df8293e9a1 100644 --- a/toolchain/install/install_paths_test.cpp +++ b/toolchain/base/install_paths_test.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" #include #include @@ -121,7 +121,7 @@ TEST_F(InstallPathsTest, TestRunfiles) { TEST_F(InstallPathsTest, BinaryRunfiles) { std::filesystem::path test_binary_path = - test_runfiles_->Rlocation("carbon/toolchain/install/test_binary"); + test_runfiles_->Rlocation("carbon/toolchain/base/test_binary"); ASSERT_THAT(Filesystem::Cwd().Access(test_binary_path, Filesystem::AccessCheckFlags::Execute), IsSuccess(Eq(true))) diff --git a/toolchain/install/install_paths_test_helpers.cpp b/toolchain/base/install_paths_test_helpers.cpp similarity index 95% rename from toolchain/install/install_paths_test_helpers.cpp rename to toolchain/base/install_paths_test_helpers.cpp index 5c6f67fdfd83..674258fff803 100644 --- a/toolchain/install/install_paths_test_helpers.cpp +++ b/toolchain/base/install_paths_test_helpers.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "toolchain/install/install_paths_test_helpers.h" +#include "toolchain/base/install_paths_test_helpers.h" #include #include diff --git a/toolchain/install/install_paths_test_helpers.h b/toolchain/base/install_paths_test_helpers.h similarity index 68% rename from toolchain/install/install_paths_test_helpers.h rename to toolchain/base/install_paths_test_helpers.h index da589ec53e18..322a15a6fb3b 100644 --- a/toolchain/install/install_paths_test_helpers.h +++ b/toolchain/base/install_paths_test_helpers.h @@ -2,11 +2,11 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_TEST_HELPERS_H_ -#define CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_TEST_HELPERS_H_ +#ifndef CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_TEST_HELPERS_H_ +#define CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_TEST_HELPERS_H_ #include "llvm/Support/VirtualFileSystem.h" -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" namespace Carbon::Testing { @@ -17,4 +17,4 @@ auto AddPreludeFilesToVfs( } // namespace Carbon::Testing -#endif // CARBON_TOOLCHAIN_INSTALL_INSTALL_PATHS_TEST_HELPERS_H_ +#endif // CARBON_TOOLCHAIN_BASE_INSTALL_PATHS_TEST_HELPERS_H_ diff --git a/toolchain/install/test_binary.cpp b/toolchain/base/test_binary.cpp similarity index 100% rename from toolchain/install/test_binary.cpp rename to toolchain/base/test_binary.cpp diff --git a/toolchain/driver/BUILD b/toolchain/driver/BUILD index d0eed97c182a..f47755bacc40 100644 --- a/toolchain/driver/BUILD +++ b/toolchain/driver/BUILD @@ -38,9 +38,9 @@ cc_library( "//common:ostream", "//common:vlog", "//third_party/llvm:clang_cc1", + "//toolchain/base:install_paths", "//toolchain/base:kind_switch", "//toolchain/base:runtime_sources", - "//toolchain/install:install_paths", "@llvm-project//clang:basic", "@llvm-project//clang:clang-driver", "@llvm-project//clang:codegen", @@ -72,7 +72,7 @@ cc_test( "//testing/base:file_helpers", "//testing/base:global_exe_path", "//testing/base:gtest_main", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@googletest//:gtest", "@llvm-project//llvm:Object", "@llvm-project//llvm:Support", @@ -97,8 +97,8 @@ cc_test( "//testing/base:file_helpers", "//testing/base:global_exe_path", "//testing/base:gtest_main", + "//toolchain/base:install_paths", "//toolchain/base:llvm_tools", - "//toolchain/install:install_paths", "@googletest//:gtest", "@llvm-project//llvm:Object", "@llvm-project//llvm:Support", @@ -116,7 +116,7 @@ cc_binary( "//testing/base:benchmark_main", "//testing/base:global_exe_path", "//testing/base:source_gen_lib", - "//toolchain/install:install_paths_test_helpers", + "//toolchain/base:install_paths_test_helpers", "//toolchain/testing:compile_helper", "@google_benchmark//:benchmark", "@llvm-project//llvm:Support", @@ -181,6 +181,7 @@ cc_library( "//common:version", "//common:vlog", "//toolchain/base:clang_invocation", + "//toolchain/base:install_paths", "//toolchain/base:llvm_tools", "//toolchain/base:shared_value_stores", "//toolchain/base:timings", @@ -189,7 +190,6 @@ cc_library( "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/diagnostics:sorting_diagnostic_consumer", "//toolchain/format", - "//toolchain/install:install_paths", "//toolchain/language_server", "//toolchain/lex", "//toolchain/lower", @@ -218,8 +218,8 @@ cc_test( "//testing/base:file_helpers", "//testing/base:global_exe_path", "//testing/base:gtest_main", + "//toolchain/base:install_paths", "//toolchain/diagnostics:diagnostic_emitter", - "//toolchain/install:install_paths", "//toolchain/lex:tokenized_buffer_test_helpers", "//toolchain/testing:yaml_test_helpers", "@googletest//:gtest", @@ -238,7 +238,7 @@ cc_fuzz_test( "//common:exe_path", "//common:raw_string_ostream", "//testing/fuzzing:libfuzzer_header", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@llvm-project//llvm:Support", ], ) @@ -251,7 +251,7 @@ cc_library( ":tool_runner_base", "//common:ostream", "//common:vlog", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@llvm-project//lld:Common", "@llvm-project//lld:ELF", "@llvm-project//lld:MachO", @@ -289,8 +289,8 @@ cc_library( ":tool_runner_base", "//common:ostream", "//common:vlog", + "//toolchain/base:install_paths", "//toolchain/base:llvm_tools", - "//toolchain/install:install_paths", "@llvm-project//lld:Common", "@llvm-project//lld:ELF", "@llvm-project//lld:MachO", @@ -326,7 +326,7 @@ cc_library( "//common:ostream", "//common:version", "//common:vlog", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@llvm-project//llvm:Support", ], ) @@ -363,7 +363,7 @@ cc_library( deps = [ "//common:ostream", "//common:vlog", - "//toolchain/install:install_paths", + "//toolchain/base:install_paths", "@llvm-project//llvm:Support", ], ) diff --git a/toolchain/driver/clang_runner.cpp b/toolchain/driver/clang_runner.cpp index cb239a48d9c3..7a3574962a2d 100644 --- a/toolchain/driver/clang_runner.cpp +++ b/toolchain/driver/clang_runner.cpp @@ -50,10 +50,10 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" #include "third_party/llvm/clang_cc1.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/clang_runtimes.h" #include "toolchain/driver/runtimes_cache.h" #include "toolchain/driver/tool_runner_base.h" -#include "toolchain/install/install_paths.h" // Defined in: // https://github.com/llvm/llvm-project/blob/main/clang/tools/driver/driver.cpp diff --git a/toolchain/driver/clang_runner.h b/toolchain/driver/clang_runner.h index 19e413bc3738..2259a292e0c4 100644 --- a/toolchain/driver/clang_runner.h +++ b/toolchain/driver/clang_runner.h @@ -17,9 +17,9 @@ #include "llvm/Support/ThreadPool.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/TargetParser/Triple.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/runtimes_cache.h" #include "toolchain/driver/tool_runner_base.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/clang_runner_test.cpp b/toolchain/driver/clang_runner_test.cpp index 2429e274a052..03daed08479f 100644 --- a/toolchain/driver/clang_runner_test.cpp +++ b/toolchain/driver/clang_runner_test.cpp @@ -22,8 +22,8 @@ #include "testing/base/capture_std_streams.h" #include "testing/base/file_helpers.h" #include "testing/base/global_exe_path.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/runtimes_cache.h" -#include "toolchain/install/install_paths.h" namespace Carbon { namespace { diff --git a/toolchain/driver/clang_runtimes.h b/toolchain/driver/clang_runtimes.h index 0ff5eea894b4..2bebcd6c6d11 100644 --- a/toolchain/driver/clang_runtimes.h +++ b/toolchain/driver/clang_runtimes.h @@ -23,9 +23,9 @@ #include "llvm/Support/ThreadPool.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/TargetParser/Triple.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/clang_runner.h" #include "toolchain/driver/runtimes_cache.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/clang_runtimes_test.cpp b/toolchain/driver/clang_runtimes_test.cpp index 588f9fc2f59d..a74884c24399 100644 --- a/toolchain/driver/clang_runtimes_test.cpp +++ b/toolchain/driver/clang_runtimes_test.cpp @@ -24,11 +24,11 @@ #include "llvm/TargetParser/Triple.h" #include "testing/base/capture_std_streams.h" #include "testing/base/global_exe_path.h" +#include "toolchain/base/install_paths.h" #include "toolchain/base/llvm_tools.h" #include "toolchain/driver/clang_runner.h" #include "toolchain/driver/llvm_runner.h" #include "toolchain/driver/runtimes_cache.h" -#include "toolchain/install/install_paths.h" namespace Carbon { namespace { diff --git a/toolchain/driver/compile_benchmark.cpp b/toolchain/driver/compile_benchmark.cpp index 0a2475b02e14..7ae4135d1fb4 100644 --- a/toolchain/driver/compile_benchmark.cpp +++ b/toolchain/driver/compile_benchmark.cpp @@ -9,8 +9,8 @@ #include "testing/base/global_exe_path.h" #include "testing/base/source_gen.h" +#include "toolchain/base/install_paths_test_helpers.h" #include "toolchain/driver/driver.h" -#include "toolchain/install/install_paths_test_helpers.h" #include "toolchain/testing/compile_helper.h" namespace Carbon::Testing { diff --git a/toolchain/driver/driver_env.h b/toolchain/driver/driver_env.h index 77b6d1d3cdc2..0fceecfaf8c9 100644 --- a/toolchain/driver/driver_env.h +++ b/toolchain/driver/driver_env.h @@ -12,9 +12,9 @@ #include "llvm/Support/ThreadPool.h" #include "llvm/Support/Threading.h" #include "llvm/Support/VirtualFileSystem.h" +#include "toolchain/base/install_paths.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/driver/runtimes_cache.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/driver_fuzzer.cpp b/toolchain/driver/driver_fuzzer.cpp index 61cf603ac9df..798a15962b29 100644 --- a/toolchain/driver/driver_fuzzer.cpp +++ b/toolchain/driver/driver_fuzzer.cpp @@ -11,8 +11,8 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" #include "testing/fuzzing/libfuzzer.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/driver.h" -#include "toolchain/install/install_paths.h" namespace Carbon::Testing { diff --git a/toolchain/driver/driver_subcommand.h b/toolchain/driver/driver_subcommand.h index 3aa5c54515d0..c91e556b76cd 100644 --- a/toolchain/driver/driver_subcommand.h +++ b/toolchain/driver/driver_subcommand.h @@ -8,8 +8,8 @@ #include "common/command_line.h" #include "common/ostream.h" #include "llvm/Support/VirtualFileSystem.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/driver_env.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/lld_runner.h b/toolchain/driver/lld_runner.h index 9143bdf040b1..cc981dd6148d 100644 --- a/toolchain/driver/lld_runner.h +++ b/toolchain/driver/lld_runner.h @@ -9,8 +9,8 @@ #include "lld/Common/Driver.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/tool_runner_base.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/runtimes_cache.h b/toolchain/driver/runtimes_cache.h index 7bbd20f80694..a2f54db04433 100644 --- a/toolchain/driver/runtimes_cache.h +++ b/toolchain/driver/runtimes_cache.h @@ -15,7 +15,7 @@ #include "common/ostream.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" namespace Carbon { diff --git a/toolchain/driver/tool_runner_base.h b/toolchain/driver/tool_runner_base.h index 5fc4c2b33a3d..ef741ee6c318 100644 --- a/toolchain/driver/tool_runner_base.h +++ b/toolchain/driver/tool_runner_base.h @@ -10,7 +10,7 @@ #include "common/ostream.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" -#include "toolchain/install/install_paths.h" +#include "toolchain/base/install_paths.h" namespace Carbon { diff --git a/toolchain/install/BUILD b/toolchain/install/BUILD index 5a0b343bae38..a9800db59b9a 100644 --- a/toolchain/install/BUILD +++ b/toolchain/install/BUILD @@ -22,66 +22,6 @@ package(default_visibility = ["//visibility:public"]) # This populates a synthetic Carbon toolchain installation under the # `prefix_root` directory. For details on its layout, see `install_dirs` below. -# A library for computing install paths for the toolchain. Note that this -# library does *not* include the data itself, as that would form a dependency -# cycle. Each part of the toolchain should add the narrow data file groups to -# their data dependencies, and then use this library to locate them. -cc_library( - name = "install_paths", - srcs = ["install_paths.cpp"], - hdrs = ["install_paths.h"], - deps = [ - "//common:check", - "//common:error", - "//common:filesystem", - "//toolchain/base:llvm_tools", - "@bazel_tools//tools/cpp/runfiles", - "@llvm-project//clang:basic", - "@llvm-project//llvm:Support", - ], -) - -cc_binary( - name = "test_binary", - testonly = 1, - srcs = ["test_binary.cpp"], - data = [":install_data"], -) - -cc_test( - name = "install_paths_test", - size = "small", - srcs = ["install_paths_test.cpp"], - data = [ - ":install_data", - ":test_binary", - ], - deps = [ - ":install_paths", - "//common:check", - "//common:error_test_helpers", - "//common:filesystem", - "//common:ostream", - "//testing/base:global_exe_path", - "//testing/base:gtest_main", - "@bazel_tools//tools/cpp/runfiles", - "@googletest//:gtest", - "@llvm-project//llvm:Support", - ], -) - -cc_library( - name = "install_paths_test_helpers", - testonly = 1, - srcs = ["install_paths_test_helpers.cpp"], - hdrs = ["install_paths_test_helpers.h"], - deps = [ - ":install_paths", - "//testing/base:global_exe_path", - "@llvm-project//llvm:Support", - ], -) - cc_library( name = "busybox_info", srcs = ["busybox_info.cpp"], @@ -115,13 +55,13 @@ cc_binary( srcs = ["busybox_main.cpp"], deps = [ ":busybox_info", - ":install_paths", "//common:all_llvm_targets", "//common:bazel_working_dir", "//common:error", "//common:exe_path", "//common:init_llvm", "//common:version_stamp", + "//toolchain/base:install_paths", "//toolchain/base:llvm_tools_def", "//toolchain/driver", "@llvm-project//llvm:Support", @@ -450,7 +390,6 @@ cc_binary( name = "make-installation-digest", srcs = ["make_installation_digest.cpp"], deps = [ - ":install_paths", "//common:bazel_working_dir", "//common:error", "//common:exe_path", @@ -458,6 +397,7 @@ cc_binary( "//common:init_llvm", "//common:map", "//common:vlog", + "//toolchain/base:install_paths", "@llvm-project//llvm:Support", ], ) diff --git a/toolchain/install/busybox_main.cpp b/toolchain/install/busybox_main.cpp index 5901f8df9776..277d70850985 100644 --- a/toolchain/install/busybox_main.cpp +++ b/toolchain/install/busybox_main.cpp @@ -13,9 +13,9 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/LLVMDriver.h" +#include "toolchain/base/install_paths.h" #include "toolchain/driver/driver.h" #include "toolchain/install/busybox_info.h" -#include "toolchain/install/install_paths.h" namespace Carbon { diff --git a/toolchain/language_server/BUILD b/toolchain/language_server/BUILD index ad9f0bec2a64..6464bc10b15c 100644 --- a/toolchain/language_server/BUILD +++ b/toolchain/language_server/BUILD @@ -21,8 +21,8 @@ cc_library( ":outgoing_messages", "//common:ostream", "//common:raw_string_ostream", + "//toolchain/base:install_paths", "//toolchain/diagnostics:diagnostic_emitter", - "//toolchain/install:install_paths", "@llvm-project//clang-tools-extra/clangd:ClangDaemon", ], ) @@ -36,11 +36,11 @@ cc_library( "//common:map", "//common:raw_string_ostream", "//toolchain/base:clang_invocation", + "//toolchain/base:install_paths", "//toolchain/base:shared_value_stores", "//toolchain/check", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/diagnostics:file_diagnostics", - "//toolchain/install:install_paths", "//toolchain/lex", "//toolchain/lex:tokenized_buffer", "//toolchain/parse", diff --git a/toolchain/language_server/context.h b/toolchain/language_server/context.h index 2804397c6793..ec18e7fe1055 100644 --- a/toolchain/language_server/context.h +++ b/toolchain/language_server/context.h @@ -10,11 +10,11 @@ #include "clang-tools-extra/clangd/LSPBinder.h" #include "common/map.h" +#include "toolchain/base/install_paths.h" #include "toolchain/base/shared_value_stores.h" #include "toolchain/diagnostics/diagnostic_consumer.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/diagnostics/file_diagnostics.h" -#include "toolchain/install/install_paths.h" #include "toolchain/lex/tokenized_buffer.h" #include "toolchain/parse/tree_and_subtrees.h" #include "toolchain/sem_ir/file.h" diff --git a/toolchain/language_server/language_server.h b/toolchain/language_server/language_server.h index 71e21726e300..cda3eb419077 100644 --- a/toolchain/language_server/language_server.h +++ b/toolchain/language_server/language_server.h @@ -6,8 +6,8 @@ #define CARBON_TOOLCHAIN_LANGUAGE_SERVER_LANGUAGE_SERVER_H_ #include "common/ostream.h" +#include "toolchain/base/install_paths.h" #include "toolchain/diagnostics/diagnostic_consumer.h" -#include "toolchain/install/install_paths.h" namespace Carbon::LanguageServer {