Re: [ITA] llvm

Takashi Yano via Cygwin-apps <[email protected]>
Newsgroups gmane.os.cygwin.applications
Message-ID <[email protected]>
On Wed, 14 May 2025 10:28:39 -0700 (PDT)
Jeremy Drake wrote:
> On Wed, 14 May 2025, Takashi Yano via Cygwin-apps wrote:
> 
> > I pushed updated llvm, clang, libcxx, libcxxabi, compiler-rt,
> > libunwind, and lld packages.
> 
> For the lld push, you did not include the added patch file.  But I suspect
> that I would be against it.  The issue is that lld does not have the
> ability to differentiate a Cygwin vs MinGW target, so any prior attempts I
> have made to try to adapt defaults to Cygwin has broken MinGW.
> Specifically, a prior patch in MSYS2 to add win32api lib resulted in
> libraries from that path getting mixed into cross MinGW links.  It seems
> like that should be able to be dealt with somehow (it must have some way
> to know not to put /usr/lib in the search path in such cases) so maybe you
> figured out a better solution in that patch.

The patch missig from repository I have added is as attached.
I thought we should add /usr/lib/w32ap at the same place
where /usr/lib is added. But I could not find.

-- 
Takashi Yano <[email protected]>
0207-LLD-add-library-path-w32api.patch (text/plain, 578 B)
--- origsrc/lld-20.1.4.src/MinGW/Driver.cpp	2025-05-06 14:46:22.679452100 +0900
+++ src/lld-20.1.4.src/MinGW/Driver.cpp	2025-05-14 15:40:37.968617300 +0900
@@ -556,6 +556,8 @@ bool link(ArrayRef<const char *> argsArr
     add("-exclude-symbols:" + StringRef(a->getValue()));
 
   std::vector<StringRef> searchPaths;
+  if (Triple(sys::getProcessTriple()).isWindowsCygwinEnvironment())
+    searchPaths.push_back("/usr/lib/w32api");
   for (auto *a : args.filtered(OPT_L)) {
     searchPaths.push_back(a->getValue());
     add("-libpath:" + StringRef(a->getValue()));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.