llvm-project/clang/Driver
Ted Kremenek b061554caa Implemented initial support for "-triple" option to the clang driver. This
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).

The new behavior is as follows:

(1) If the user does not specify -triple:

   (a) If no -arch options are specified, the target triple used is the host
   triple (in llvm/Config/config.h).
   
   (b) If one or more -arch's are specified (and no -triple), then there is
       one triple for each -arch, where the specified arch is substituted
       for the arch in the host triple.  Example:
          host triple = i686-apple-darwin9
          command: clang  -arch ppc -arch ppc64 ...
          triples used: ppc-apple-darwin9  ppc64-apple-darwin9
          
(2) The user does specify a -triple (only one allowed):

  (a) If no -arch options are specified, the triple specified by -triple
      is used.  E.g clang -triple i686-apple-darwin9
      
  (b) If one or more -arch options are specified, then the triple specified
      by -triple is used as the primary target, and the arch's specified
      by -arch are used to create secondary targets.  For example:
      
      clang -triple i686-apple-darwin9 -arch ppc -arch ppc64
      
      has the following targets:
         i686-apple-darwin9  (primary target)
         ppc-apple-darwin9
         ppc64-apple-darwin9


Other changes related to the changes to the driver:

- TargetInfoImpl now includes the triple string.

- TargetInfo::getTargetTriple returns the triple for its primary target.

- test case test/Parser/portability.c has been updated because "-arch linux" is
  no longer valid ("linux" is an OS, not an arch); instead we use a bogus
  architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.

llvm-svn: 44551
2007-12-03 22:06:55 +00:00
..
ASTConsumers.cpp Fix an ast-print/ast-dump bug. 2007-12-03 21:43:25 +00:00
ASTConsumers.h pass diagnostics into the rewrite test client. 2007-11-30 22:25:36 +00:00
DiagChecker.cpp start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
Makefile Take 2. 2007-10-31 20:01:01 +00:00
PPCBuiltins.def Add support for target-specific builtins, including detecting nonportability 2007-01-29 05:24:35 +00:00
PrintParserCallbacks.cpp Implement ObjC built-in types in MinimalAction. 2007-10-31 20:55:39 +00:00
PrintPreprocessedOutput.cpp fix a bunch of regressions I introduced :( 2007-10-10 23:31:03 +00:00
RewriteTest.cpp Support for rewriteing of messaging of methods which return float. 2007-12-03 21:26:48 +00:00
SerializationTest.cpp Implemented serialization of SelectorTable and Selectors. 2007-11-30 22:46:56 +00:00
Targets.cpp Implemented initial support for "-triple" option to the clang driver. This 2007-12-03 22:06:55 +00:00
TextDiagnosticBuffer.cpp start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
TextDiagnosticBuffer.h start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
TextDiagnosticPrinter.cpp start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
TextDiagnosticPrinter.h start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
TextDiagnostics.cpp start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
TextDiagnostics.h start partitioning the diagnostics into two classes: those 2007-11-30 22:53:43 +00:00
X86Builtins.def Add correct types for the last remaining intrinsics. 2007-11-28 06:09:44 +00:00
clang.cpp Implemented initial support for "-triple" option to the clang driver. This 2007-12-03 22:06:55 +00:00
clang.h Implemented initial support for "-triple" option to the clang driver. This 2007-12-03 22:06:55 +00:00