__arm macro meaning and purpose


We observe that there are several macros being defined in ARMCLANG. It would be helpful, if we know the meaning or purpose of these macros and will help us to use these macros judiciously:



  • Hi Malli, 

    These are target identification macros and will be set for each respective target backend (AArch64, Arm (32 bit)). There is no functional difference between the __name__ and __name variants.

    It's worth noting that __arm64__ was/is a Darwin alternative to __aarch64__, and although the backends have since been merged, it seems that macro is still used to identify when you're using a darwin triple (iOS, watch etc). For e.g. compiling for "arm64-apple-ios".

    Hope this helps. 

    Best regards, 


More questions in this forum