[llvm] Support: allow building with non-C/C++ language linkers (PR #65634)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 09:55:46 PDT 2023


================
@@ -79,7 +79,7 @@ endif( MSVC OR MINGW )
 # Delay load shell32.dll if possible to speed up process startup.
 set (delayload_flags)
 if (MSVC)
-  set (delayload_flags delayimp -delayload:shell32.dll -delayload:ole32.dll)
+  set (delayload_flags $<$<NOT:$<LINK_LANGUAGE:Swift>>:"SHELL:delayimp -delayload:shell32.dll -delayload:ole32.dll">)
----------------
compnerd wrote:

The `SHELL:` ensures that the `-delayload` would not be de-duplicated if it is split up.  By default CMake will de-duplicate link arguments, and the `SHELL` modifier tells it to pass it through unaltered.

https://github.com/llvm/llvm-project/pull/65634


More information about the llvm-commits mailing list