mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add support for forcing a rebuild of runtimes (#6537)
This is useful during development, testing, and will also be useful for a more bazel-integrated build step. Also clean up the path management when creating runtimes: - Teach the main runtimes code to handle making a relative path absolute - Separate out methods for _creating_ a runtimes tree vs. opening an existing one. Teach the creation path to create intervening directories as needed. This provides a more useful and less surprising set of behaviors. Last but not least, also clean up a bunch of comments in the runtimes cache code to talk generically about components -- these APIs are no longer specific to the resource directory.
This commit is contained in:
@@ -206,9 +206,8 @@ auto Driver::RunCommand(llvm::ArrayRef<llvm::StringRef> args) -> DriverResult {
|
||||
driver_env_.runtimes_cache = std::move(*cache_result);
|
||||
|
||||
if (!options.prebuilt_runtimes_path.empty()) {
|
||||
auto result = Runtimes::Make(
|
||||
std::filesystem::absolute(options.prebuilt_runtimes_path.str()),
|
||||
driver_env_.vlog_stream);
|
||||
auto result = Runtimes::OpenExisting(options.prebuilt_runtimes_path.str(),
|
||||
driver_env_.vlog_stream);
|
||||
if (!result.ok()) {
|
||||
// TODO: We should provide a better diagnostic than the raw error.
|
||||
CARBON_DIAGNOSTIC(DriverPrebuiltRuntimesInvalid, Error, "{0}",
|
||||
|
||||
Reference in New Issue
Block a user