-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add support for LLD 6.0.0 & switch CI to LDC-LLVM 6.0.0 #2608
Conversation
be53e7e
to
d49c24f
Compare
@thewilsonator: Shall we include SPIR-V in LDC-LLVM 6.0.0? Our ldc-release_60 branch should be ready [incl. compiler-rt as git submodule with automatic build inclusion]. |
@joakim-noah: It'd be great if you could check our Android compatibility with LLVM 6.0.0 via the source artifact available here (I had to resolve a few conflicts while cherry-picking). Edit: Or just the prebuilt x86_64 artifact from here for the cross-compiler. |
Incomplete list of current 6.0.0 regressions:
|
No problem compiling LDC against the pre-built llvm you linked, but it doesn't link the final |
Same issue on OSX apparently; I guess that's related to the order of the new LLD libs... |
The Win32 inline asm issue appears to be triggered by core.cpuid, with enabled optimizations only, so probably has to be considered as LLVM bug. Failing |
Oh @joakim-noah: I can't use the prebuilt LLVMs in my Ubuntu 16.04 VM either. They're built on Ubuntu 14.04 with gcc 4.9, and IIRC there have been breaking ABI changes with newer gcc versions. |
At least green on macOS now. On Win32, I tried replacing the DMD-style inline asm with LLVM asm: import ldc.llvmasm;
__asm(`mov %eax, 2
cpuid
mov $0, %eax
mov $1, %ebx
mov $2, %ecx
mov $3, %edx`, "=*m,=*m,=*m,=*m,~{eax},~{ebx},~{ecx},~{edx}",
&a[0], &a[1], &a[2], &a[3]); That makes it work with enabled optimizations, but for a debug build, LLVM errors out with |
OK, I've kicked off a build of the latest |
[Ah yes sry I forgot to mention that |
The exception stack trace issue on Linux x86_64 is due to the output of
regressing to
Only with debug defaultlibs that is; the release libs only show a few less file/line infos compared to LLVM 5.0.1:
Edit: Erm, the line info in the release stack trace is clearly wrong, that file only has 38 lines. It's correct for LLVM 5.0.1. |
Alright, finally got All the same stdlib tests pass with your tweaked llvm 6.0 and ldc master, with only that long-standing EH test failing. |
LLVM 6.0.0 appears to default to a newer Dwarf debuginfo version (at least for Linux), which the stacktrace generator in druntime doesn't handle yet. This then led to the discovery of a bug in that druntime code, responsible for the previously single strack trace entry when linking against debug druntime. |
The previous regex only happened to work because the TableGen lib apparently used to be the first one. The new WindowsManifest lib is the new first lib for LLVM 6.0. The previous regex also didn't work on Windows/MSVC as the LLVM_LIBRARIES entry doesn't start with `-`; it looks like `C:\...\LLVMTableGen.lib`.
The WindowsManifest LLVM libary apparently comes with a libxml2 dependency on non-Windows.
At least on Linux it appears to default to v4 or newer, which druntime's rt.backtrace.dwarf doesn't handle yet. This fixes tests/codegen/exception_stack_trace.d on Linux.
2440973
to
75e549d
Compare
Should be ready now, except for LDC-LLVM 6.0 finalization (@thewilsonator: SPIR-V?). I promoted the 2 MSVC regressions to separate issues now. |
How's the built-in lld working these days? I'm thinking of trying it out for Android and switching to it if it passes all the tests. I could remove the binutils/clang dependency for the Termux Android package too. |
Pretty sure it wouldn't cause a lot of issues, but the huge command-line issue remains the same. |
Yeah, gathering all those flags is a pain for an arbitrary distro but we could probably do it for more standard setups like Win/Mac or the Android NDK and Termux app. I'll try it out. |
[It's working fine on Windows, there's no cmdline hell as on Posix; it's all in environment variables, which are set up by calling an MSVC batch file (still better than having to perform a dummy link with |
Would it be possible to merge these and do a new 1.8.1 release with llvm 6.0 support? |
How urgent is the LLVM 6 support? I hope we'll be able to provide a LDC 1.9 beta1 in about 2 weeks and the final in ~4. |
I was hoping to be able to switch Fedora 28's LDC to LLVM 6 in time for the Fedora 28 final freeze, which is on April 15. Right now it's stuck with LLVM 4 due to various ppc64el bugs in LLVM 5 (#2356) and now Fedora LLVM people want to remove LLVM 4 from Fedora 28 (https://src.fedoraproject.org/rpms/ldc/pull-request/1). |
@kalev: I quickly scanned through the changes. What you could do (for LLVM 6 support) is use |
Ah, awesome, let me try that. Thanks @kinke! |
[Oh and you could also achieve the latter by simply adding a new default switch |
No description provided.