1. Make resource dir unique and global.

2. Use our custom CDB loader.
This commit is contained in:
ykiko
2024-12-10 16:15:50 +08:00
parent f9bff085b2
commit c082458fb1
16 changed files with 332 additions and 194 deletions

View File

@@ -29,14 +29,16 @@ llvm::StringRef resource_dir() {
} // namespace clice
int main(int argc, char** argv) {
using namespace clice;
if(auto error = fs::init_resource_dir(argv[0])) {
llvm::outs() << std::format("Failed to get resource directory, because {}\n", error);
return 1;
}
testing::InitGoogleTest(&argc, argv);
llvm::cl::ParseCommandLineOptions(argc, argv, "clice test\n");
if(auto error = clice::fs::real_path(llvm::Twine(argv[0]) + "/../../lib/clang/20)",
clice::cl::resource_dir)) {
llvm::errs() << "Failed to get resource directory, because " << error.message() << '\n';
}
return RUN_ALL_TESTS();
}