[PATCH] D59048: Add AIX Target Info

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 22:13:26 PST 2019


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/Basic/Targets/OSTargets.h:626
+    
+    // FIXME: Define AIX OS-Version Macros
+    Builder.defineMacro("_AIX");
----------------
apaprocki wrote:
> hubert.reinterpretcast wrote:
> > Comments should be full sentences (with periods). Please update throughout this patch.
> I do not think it is realistic to support an AIX target prior to 7.1, so should this unconditionally define up to and including `_AIX71` similar to D18360 did (it was written earlier and defined up to `_AIX61` unconditionally) and leave a `FIXME` to determine when to emit `_AIX72` or any other later versions?
I agree with your assessment re: older versions of AIX in terms of having a full solution for modern C++. Nevertheless, we can leave room open for hobby builds targeting older versions where the immediate cost is not high. Cross compiling to an older AIX target will probably be entirely possible for C.


================
Comment at: clang/test/Preprocessor/init.c:6420
+// PPC64-AIX:#define _LONG_LONG 1
+// PPC64-AIX:#define _POWER 1
+// PPC64-AIX:#define __64BIT__ 1
----------------
apaprocki wrote:
> XL on AIX emits `#define _LP64 1` in 64-bit mode and `#define _ILP32 1` in 32-bit mode in the pre-defined macros. Is that important to capture?
I think so. The v16.1 XL compiler's `xlclang` also produces these.

```
#define __LP64__ 1
#define _LP64 1
```

```
#define __ILP32__ 1
#define _ILP32 1
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59048





More information about the cfe-commits mailing list