-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix llvm 10 #3144
Fix llvm 10 #3144
Conversation
diagnosticsFilename, EC, llvm::sys::fs::F_None); | ||
if (EC) { | ||
irs.dmodule->error("Could not create file %s: %s", | ||
diagnosticsFilename.c_str(), EC.message().c_str()); | ||
fatal(); | ||
} | ||
|
||
//FIXME: this has been replaced by setDiagnosticHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N.B. I'm not sure how tot get back the original behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a link to the commit that removed setDiagnosticsOutputFile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that was purely speculative as it appears that setDiagnosticsOutputFile
no longer exists and setDiagnosticHandler
is the only thing there that could logically replace its functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here: llvm-mirror/llvm@78ee34a#diff-b1ec65e53a672d9db72a97451556fe87
Adapted in #3166.
@Robertorosmaninho if you are trying to build with the latest LLVM you'll need to use this patch. You'll also need to comment out this line as I haven't managed to work out a solution for this |
I don't like |
Neither do I (I wanted to put this up sooner so that @Robertorosmaninho can have a functioning LDC to start his work on). I could have sworn we used to have an llvm compatibility module somewhere but I couldn't find it, otherwise I'd have put it in there. I think we are going to have to have something like that for the CallSite changes anyway, those look pretty nasty. |
@@ -29,6 +29,12 @@ | |||
#include "lld/Common/Driver.h" | |||
#endif | |||
|
|||
#if LDC_LLVM_VER >= 1000 | |||
using std::make_unique; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this depend on C++ version? LLVM 10 requires C++14?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So as kinke already mentioned, this breaks with c++14 compilation for LLVM < 10. So change the condition to cplusplus version, instead of LLVM version.
@@ -34,6 +34,11 @@ | |||
#include "llvm/Support/FileSystem.h" | |||
#include "llvm/Support/MD5.h" | |||
|
|||
#if LDC_LLVM_VER >= 1000 | |||
using std::make_unique; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move this repeated piece into a helper header file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swear we used to have an LLVM compatibility file somewhere, did it get removed? Because I can't find it.
@thewilsonator Can you track down which LLVM commit / phabricator removed |
@Robertorosmaninho you'll also need to apply druntime.txt to druntime to get the runtime to build. |
Any guesses as to why MSVC think that the call to |
Nope, no relevant |
my guess is that we enable c++11 (not 14), which does not have |
MS So this apparently just shows that this PR can currently only be compiled as C++11 and not with any later version (with LLVM < 10). Edit: And we seem to just inherit the C++ lang version from the LLVM C++ flags. |
Microsoft is obviously a PITA and chose to use |
Include some of Nicholas' fixes in ldc-developers#3144.
Including some of Nicholas' fixes in ldc-developers#3144.
Including some of Nicholas' fixes in ldc-developers#3144.
Including some of Nicholas' fixes in ldc-developers#3144.
Including some of Nicholas' fixes in ldc-developers#3144.
yeah |
This fixes some compilation errors with LLVM 10.
Not fixed is the issue with change of CallSite to CallBase that changed with IRBuilder::CreateMemSet