diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-03 22:26:16 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-03 22:26:16 +0000 |
commit | f4c45b06b99d8917e6df20140a18341482828917 (patch) | |
tree | 39f9106c074189514e997ed5f6646b267ab83f48 /NOTES.txt | |
parent | 87ce5d1cb99094fc7ffb42e0522da4e7bab403f8 (diff) |
Added some notes on the -triple and -arch options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'NOTES.txt')
-rw-r--r-- | NOTES.txt | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -120,6 +120,47 @@ TODO: New language feature: Configuration queries: allowing a single index to be used for all fat slices. //===---------------------------------------------------------------------===// +// Specifying targets: -triple and -arch +===---------------------------------------------------------------------===// + +The clang supports "-triple" and "-arch" options. At most one -triple option may +be specified, while multiple -arch options can be specified. Both are optional. + +The "selection of target" behavior is defined 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 (secondary target) + ppc64-apple-darwin9 (secondary target) + +The secondary targets are used in the 'portability' model (see below). + +//===---------------------------------------------------------------------===// The 'portability' model in clang is sufficient to catch translation units (or their parts) that are not portable, but it doesn't help if the system headers |