Skip to content

Commit

Permalink
Upgrade LLVM to 18.1.8
Browse files Browse the repository at this point in the history
Bug: b/385208338
  • Loading branch information
Databean committed Dec 20, 2024
1 parent a5f44f3 commit ab11291
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion base/cvd/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bazel_dep(name = "toolchains_llvm", version = "1.2.0")
# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
llvm_version = "16.0.0",
llvm_version = "18.1.8",
)

use_repo(llvm, "llvm_toolchain")
Expand Down
6 changes: 3 additions & 3 deletions base/cvd/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion base/cvd/cuttlefish/common/libs/fs/shared_fd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ int FileInstance::LinkAtCwd(const std::string& path) {
name += std::to_string(fd_);
errno = 0;
int rval =
linkat(-1, name.c_str(), AT_FDCWD, path.c_str(), AT_SYMLINK_FOLLOW);
linkat(AT_FDCWD, name.c_str(), AT_FDCWD, path.c_str(), AT_SYMLINK_FOLLOW);
errno_ = errno;
return rval;
}
Expand Down
16 changes: 10 additions & 6 deletions base/cvd/cuttlefish/common/libs/utils/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,17 @@ Result<std::string> ReadFileContents(const std::string& filepath) {
}

std::string CurrentDirectory() {
std::unique_ptr<char, void (*)(void*)> cwd(getcwd(nullptr, 0), &free);
std::string process_cwd(cwd.get());
if (!cwd) {
PLOG(ERROR) << "`getcwd(nullptr, 0)` failed";
return "";
std::vector<char> process_wd(1 << 12, ' ');
while (getcwd(process_wd.data(), process_wd.size()) == nullptr) {
if (errno == ERANGE) {
process_wd.resize(process_wd.size() * 2, ' ');
} else {
PLOG(ERROR) << "getcwd failed";
return "";
}
}
return process_cwd;
// Will find the null terminator and size the string appropriately.
return process_wd.data();
}

FileSizes SparseFileSizes(const std::string& path) {
Expand Down

0 comments on commit ab11291

Please sign in to comment.