[PATCH] D154087: Upstream Cygwin Clang patches

Xu, Chiheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 07:35:21 PDT 2023


xu-chiheng created this revision.
Herald added subscribers: pengfei, mstorsjo, sunfish, hiraditya, dschuff.
Herald added a project: All.
xu-chiheng requested review of this revision.
Herald added subscribers: llvm-commits, jplehr, sstefan1, MaskRay, aheejin.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.

Upstream Cygwin Clang/LLVM patches from

1. https://cygwin.com/git-cygwin-packages/
2. https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/clang.git;a=summary
3. git://cygwin.com/git/cygwin-packages/clang.git
4. https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/llvm.git;a=summary
5. git://cygwin.com/git/cygwin-packages/llvm.git

3 patches are applied:
7.0.1-cygwin-basic.patch
7.0.1-cygwin-driver.patch
8.0.1-cmodel-medium.patch

Note : I am not the author the patches, I just rebase the patches to revision 993a923a09ec8ea4e895b4ea2331da99cc23d1a4 <https://reviews.llvm.org/rG993a923a09ec8ea4e895b4ea2331da99cc23d1a4>

The patched Clang compiler can build GCC on Cygwin, but can't build Clang itself, there are error like below, I don't know how to fix.

make[2]: *** No rule to make target 'tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o', needed by 'bin/cygclangBasic-17git.dll'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:32924: tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 33%] Built target DllOptionsTableGen
[ 33%] Built target WebAssemblyCommonTableGen
make: *** [Makefile:156: all] Error 2

cd /cygdrive/e/Note/Tool/llvm-release-build/tools/clang/lib/Basic && /cygdrive/d/cygwin64-packages/clang/bin/clang++.exe -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/cygdrive/e/Note/Tool/llvm-release-build/tools/clang/lib/Basic -I/cygdrive/e/Note/Tool/llvm/clang/lib/Basic -I/cygdrive/e/Note/Tool/llvm/clang/include -I/cygdrive/e/Note/Tool/llvm-release-build/tools/clang/include -I/cygdrive/e/Note/Tool/llvm-release-build/include -I/cygdrive/e/Note/Tool/llvm/llvm/include -O2 -march=x86-64 -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=gnu++17 -MD -MT tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o -MF CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o.d -o CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o -c /cygdrive/e/Note/Tool/llvm/clang/lib/Basic/Attributes.cpp

$ ls -lha tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/
total 5.3M
drwxr-xr-x+ 1 Administrator None    0 Jun 29 18:06 .
drwxr-xr-x+ 1 Administrator None    0 Jun 29 17:35 ..
-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
-rw-r--r--+ 1 Administrator None 153K Jun 29 17:35 build.make
-rw-r--r--+ 1 Administrator None 135K Jun 29 17:37 Builtins.cpp.o
-rw-r--r--+ 1 Administrator None  19K Jun 29 17:37 Builtins.cpp.o.d
-rw-r--r--+ 1 Administrator None 1.1K Jun 29 17:37 CharInfo.cpp.o
-rw-r--r--+ 1 Administrator None  12K Jun 29 17:37 CharInfo.cpp.o.d
-rw-r--r--+ 1 Administrator None  559 Jun 29 17:37 CLWarnings.cpp.o
-rw-r--r--+ 1 Administrator None 2.4K Jun 29 17:37 CLWarnings.cpp.o.d


https://reviews.llvm.org/D154087

Files:
  clang/lib/Basic/Targets/X86.h
  clang/lib/Driver/CMakeLists.txt
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/Cygwin.cpp
  clang/lib/Driver/ToolChains/Cygwin.h
  clang/lib/Lex/InitHeaderSearch.cpp
  llvm/lib/Target/X86/X86TargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154087.535786.patch
Type: text/x-patch
Size: 28275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/ea593568/attachment.bin>


More information about the llvm-commits mailing list