This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Define __HOS_AIX__ macro only for AIX target
ClosedPublic

Authored by Jake-Egan on Aug 10 2021, 7:08 AM.

Details

Summary


This patch defines the macro __HOS_AIX__ when the target is AIX and without any dependency on the host. The macro indicates that the host is AIX. Defining the macro will help minimize porting pain for existing code compiled with xlc/xlC. xlC never shipped cross-compiling support, so the difference is not observable anyway.

This is a follow up to the discussion in https://reviews.llvm.org/D107242.

Diff Detail

Event Timeline

Jake-Egan created this revision.Aug 10 2021, 7:08 AM
Jake-Egan requested review of this revision.Aug 10 2021, 7:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2021, 7:08 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Jake-Egan retitled this revision from Define __HOS_AIX__ only for AIX target to [AIX] Define __HOS_AIX__ macro only for AIX target.Aug 10 2021, 7:32 AM
Jake-Egan edited the summary of this revision. (Show Details)
Jake-Egan edited the summary of this revision. (Show Details)
joerg accepted this revision.Aug 10 2021, 8:06 AM

LGTM. Maybe include a small hint in the commit message that xlC never shipped cross-compiling support and the difference is therefore not observable anyway.

This revision is now accepted and ready to land.Aug 10 2021, 8:06 AM
cebowleratibm accepted this revision.Aug 10 2021, 8:14 AM
Jake-Egan edited the summary of this revision. (Show Details)Aug 10 2021, 8:22 AM
This revision was automatically updated to reflect the committed changes.
clang/test/Preprocessor/init-ppc.c