Thread overview
[Issue 20421] Exceptions don't work when linking through lld-link
Nov 27, 2019
kinke
Nov 27, 2019
Rainer Schuetze
Feb 09, 2020
Dlang Bot
Feb 10, 2020
Dlang Bot
Feb 27, 2020
Dlang Bot
November 27, 2019
https://issues.dlang.org/show_bug.cgi?id=20421

kinke <kinke@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke@gmx.net

--- Comment #1 from kinke <kinke@gmx.net> ---
I've had my share of related issues as well; even had to fork LLVM's
compiler-rt to make their assembly files SAFESEH compatible. - This is almost
certainly already fixed in the new (but so far unused by DMD) MinGW-based libs;
e.g., see
https://github.com/ldc-developers/mingw-w64-libs/blob/8d930c129daa798379b3d563617847f8e895f43e/buildsdk.d#L379.

--
November 27, 2019
https://issues.dlang.org/show_bug.cgi?id=20421

--- Comment #2 from Rainer Schuetze <r.sagitario@gmx.de> ---
It works out of the box by using the MS linker (still using the mingw libraries that come with dmd). Making the libs SAFESEH compatible would be nice, but I don't think dmd generates appropriate object files anyway. So passing /SAFESEH:NO to lld v9 might be an option.

--
February 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20421

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@rainers created dlang/installer pull request #433 "fix Issue 20421 - Exceptions don't work when linking through lld-link" fixing this issue:

- fix Issue 20421 - Exceptions don't work when linking through lld-link

  patch LLD to not set IMAGE_DLL_CHARACTERISTICS_NO_SEH, the MS linker also
doesn't do this.

https://github.com/dlang/installer/pull/433

--
February 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20421

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/installer pull request #433 "fix Issue 20421 - Exceptions don't work when linking through lld-link" was merged into master:

- 7f990228948520366d4ccf0c79c2f2407ffc2e1f by Rainer Schuetze:
  fix Issue 20421 - Exceptions don't work when linking through lld-link

  patch LLD to not set IMAGE_DLL_CHARACTERISTICS_NO_SEH, the MS linker also
doesn't do this.

https://github.com/dlang/installer/pull/433

--
February 27, 2020
https://issues.dlang.org/show_bug.cgi?id=20421

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10814 "fix issue 20421 - Exceptions don't work when linking through lld-link" was merged into stable:

- e8b41b36b35dacbb7fd9cce4342cac2787ecfda3 by Rainer Schuetze:
  fix issue 20421 - Exceptions don't work when linking through lld-link

  when linking through lld-link, add /SAFESEH:NO to linker command line

  add build on azure that uses lld and mingw import libraries
  use run.d instead of gmake to run tests
  d_do_test: remove legacy command line "-map nul.map"
  update to build with LDC 1.20.0

https://github.com/dlang/dmd/pull/10814

--