[PATCH] D154087: Upstream Cygwin Clang patches

Xu, Chiheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 13:26:16 PDT 2023


xu-chiheng added a comment.

On Fri, Jun 30, 2023 at 1:53 AM Eli Friedman via Phabricator
<reviews at reviews.llvm.org> wrote:

> This really needs to be submitted as three separate patches: one for for the clang/lib/Basic changes, one for the X86TargetMachine changes, and one for the clang driver.  And the changes need to update the corresponding regression tests (in clang/test/ and llvm/test/) to verify for cygwin-specific behavior.  (Let me know if you can't find the relevant regression tests.)

It is easy to split to 3 patches, the code is simple. The patches were
written by a Cygwin Clang maintainer. Setting up a testing environment
on Cygwin and Windows in general is not simple, I suspect that it has
never been done yet.   I have used the patched Clang to build Cross
GCC on Cygwin successfully.  It builds GMP, MPFR, MPC, Binutils, GCC
correctly.  and the then built target libgcc is also working.  But
using the patched Clang to build Clang itself, choke at
clang/lib/Basic/Attributes.cpp,  that file includes tablegened files,
I don't know very much about tablegened files.

>> there are error like below, I don't know how to fix.
>
> Is clang crashing?  Usually when clang crashes it prints some indication of that to stderr, but I guess the crash handler might be broken on cygwin.  Have you tried attaching a debugger?

It does not crash, it just produce no .o file from .cpp file, leaving
several temp files:

-rw-r--r--+ 1 Administrator None    0 Jun 29 17:37 Attributes.cpp-2b221e1d.o.tmp
-rw-r--r--+ 1 Administrator None    0 Jun 29 18:03 Attributes.cpp-65749625.o.tmp
-rw-r--r--+ 1 Administrator None    0 Jun 29 18:06 Attributes.cpp-7e1889df.o.tmp
-rw-r--r--+ 1 Administrator None    0 Jun 29 18:00 Attributes.cpp-fd50fae7.o.tmp


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154087/new/

https://reviews.llvm.org/D154087



More information about the llvm-commits mailing list