mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) (#3305)
This commit is contained in:
parent
97e0d978ee
commit
0a007a55f8
13 changed files with 31 additions and 28 deletions
|
@ -109,7 +109,7 @@ void printVersion(llvm::raw_ostream &OS) {
|
|||
#endif
|
||||
#endif
|
||||
OS << " Default target: " << llvm::sys::getDefaultTargetTriple() << "\n";
|
||||
std::string CPU = llvm::sys::getHostCPUName();
|
||||
std::string CPU(llvm::sys::getHostCPUName());
|
||||
if (CPU == "generic" || env::has("SOURCE_DATE_EPOCH")) {
|
||||
// Env variable SOURCE_DATE_EPOCH indicates that a reproducible build is
|
||||
// wanted. Don't print the actual host CPU in such an environment to aid
|
||||
|
@ -564,7 +564,7 @@ void fixupUClibcEnv() {
|
|||
llvm::Triple triple(mTargetTriple);
|
||||
if (triple.getEnvironmentName().find("uclibc") != 0)
|
||||
return;
|
||||
std::string envName = triple.getEnvironmentName();
|
||||
std::string envName(triple.getEnvironmentName());
|
||||
envName.replace(0, 6, "gnu");
|
||||
triple.setEnvironmentName(envName);
|
||||
mTargetTriple = triple.normalize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue