[cfe-commits] [PATCH][llvm][clang] Triple::{MinGW32|MinGW64} => Triple::MinGW

NAKAMURA Takumi geek4civic at gmail.com
Tue Feb 15 01:31:59 PST 2011


Good evening.

For "so-called mingw64", a few issues are there.

  - autoconf does not know "*-mingw64".
  - The project "Mingw-w64" uses *-w64-mingw32 as triplet.
  - in llvm and clang, some parts assume Win64 as "Triple::MinGW64".

In practice, we don't need to distinguish "MinGW32" and "MinGW64" in llvm.
In clang, we should not assume "x86_64-mingw" as *-w64-mingw32.
There is also "i686-w64-mingw32", as a variant of mingw32.

I propose 4 patches for;

  - Introduce generic Triple::MinGW. MinGW32 and MinGW64 will be deprecated.
  - Add paths for (personally) known mingw-w64.

Excuse me, I split patches for 4 parts, to be consistent for llvm and
clang repository.

Checked on x86_64-w64-g++(20101129, 20110207) and stage2-3 x64-clang.

Any feedbacks are welcome!
Thank you in advance.

...Takumi


[llvm]

NAKAMURA Takumi (2):
  Introduce Triple::MinGW.
  Triple::MinGW32 and Triple::MinGW64 are deprecated and removed. We
    can use Triple::MinGW.

 include/llvm/ADT/Triple.h                 |    3 +--
 lib/Support/Triple.cpp                    |    9 +++------
 lib/Target/ARM/ARMAsmBackend.cpp          |    2 +-
 lib/Target/ARM/ARMTargetMachine.cpp       |    3 +--
 lib/Target/MBlaze/MBlazeAsmBackend.cpp    |    2 +-
 lib/Target/MBlaze/MBlazeTargetMachine.cpp |    3 +--
 lib/Target/X86/X86AsmBackend.cpp          |    4 ++--
 lib/Target/X86/X86Subtarget.h             |    4 +---
 lib/Target/X86/X86TargetMachine.cpp       |    6 ++----
 9 files changed, 13 insertions(+), 23 deletions(-)

[clang]

NAKAMURA Takumi (2):
  Introduce Triple::MinGW. MinGW32 and MinGW64 are deprecated.
  lib/Frontend/InitHeaderSearch.cpp: Add mingw-w64's include paths.

 lib/Basic/Targets.cpp             |    4 ++--
 lib/CodeGen/TargetInfo.cpp        |    4 ++--
 lib/Driver/Driver.cpp             |    3 +--
 lib/Driver/Tools.cpp              |    3 +--
 lib/Frontend/InitHeaderSearch.cpp |   21 ++++++++++-----------
 lib/Sema/TargetAttributesSema.cpp |    3 +--
 6 files changed, 17 insertions(+), 21 deletions(-)



More information about the cfe-commits mailing list