nemanjai added a comment.

In D107242#2932289 <https://reviews.llvm.org/D107242#2932289>, @joerg wrote:

> I'm puzzled by this change. I don't think we have any case so far where the 
> compiler behavior changes with the host OS and I don't think it should. 
> What's the point / use case of this macro?

I agree that this is strange. And strange things need good documentation. The 
documentation for this extremely strange behaviour is woefully inadequate both 
in the code and in the commit message. Of course, I am not certain why this is 
needed but I assume it has something to do with the fact that it is the OS on 
AIX that owns the headers so the compiler needs to know whether it is running 
on an AIX host due to some non-portable code in the headers. Of course, this 
can't be the full explanation as it brings up many questions. This needs to be 
very clear to the reader - both in the commit message and in the code.

Another thing that I find extremely strange is that we set this only if we are 
on an AIX host **and** are targeting AIX. If this is truly something that has 
to do with the host (which I am not positive is the case as I'm not sure what 
`HOS` in the macro name means), then why is it not needed when cross-compiling?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107242

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to