mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-05 18:49:06 +00:00
1. Use better error messages in LinkFiles().
2. I think the caller of LinkFiles() should not ignore a true return value. (If you have a good reason why it ought to, feel free to revert this. It's just something that's been bugging me for a while.) llvm-svn: 8760
This commit is contained in:
parent
55e08dd846
commit
7e16b3f05b
@ -401,13 +401,13 @@ bool LinkFiles(const char *progname,
|
|||||||
Pathname = Files[i];
|
Pathname = Files[i];
|
||||||
} else {
|
} else {
|
||||||
if (SearchPath == NULL) {
|
if (SearchPath == NULL) {
|
||||||
std::cerr << "Cannot find " << Files[i];
|
std::cerr << "Cannot find linker input file '" << Files[i] << "'";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pathname = std::string(SearchPath)+"/"+Files[i];
|
Pathname = std::string(SearchPath)+"/"+Files[i];
|
||||||
if (!FileExists(Pathname)) {
|
if (!FileExists(Pathname)) {
|
||||||
std::cerr << "Cannot find " << Files[i];
|
std::cerr << "Cannot find linker input file '" << Files[i] << "'";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,8 @@ main(int argc, char **argv, char ** envp)
|
|||||||
Libraries.end());
|
Libraries.end());
|
||||||
|
|
||||||
// Link in all of the files
|
// Link in all of the files
|
||||||
LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose);
|
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
||||||
|
return 1; // Error already printed
|
||||||
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native);
|
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native);
|
||||||
|
|
||||||
// Link in all of the libraries next...
|
// Link in all of the libraries next...
|
||||||
|
Loading…
Reference in New Issue
Block a user