mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
Fix some more deprecations with LLVM 16 (#4185)
This commit is contained in:
parent
f27b9461b8
commit
19e7024377
2 changed files with 22 additions and 1 deletions
|
@ -426,7 +426,12 @@ createTargetMachine(const std::string targetTriple, const std::string arch,
|
|||
}
|
||||
|
||||
// Handle cases where LLVM picks wrong default relocModel
|
||||
if (!relocModel.hasValue()) {
|
||||
#if LDC_LLVM_VER >= 1600
|
||||
if (relocModel.has_value()) {}
|
||||
#else
|
||||
if (relocModel.hasValue()) {}
|
||||
#endif
|
||||
else {
|
||||
if (triple.isOSDarwin()) {
|
||||
// Darwin defaults to PIC (and as of 10.7.5/LLVM 3.1-3.3, TLS use leads
|
||||
// to crashes for non-PIC code). LLVM doesn't handle this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue