[libc-commits] [PATCH] D112818: [libc] Add more robust compile time architecture detection

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Oct 29 12:59:09 PDT 2021


gchatelet added inline comments.


================
Comment at: libc/src/__support/architectures.h:37-51
+#if defined(__mips64)
+#define LLVM_LIBC_ARCH_MIPS64
+#endif
+
+#if defined(__mips__) && !defined(__mips64) // mips64 also declares __mips__
+#define LLVM_LIBC_ARCH_MIPS32
+#endif
----------------
sivachandra wrote:
> michaelrj wrote:
> > I don't think we actually support these architectures yet, do we need macros for them?
> I will leave it up to @gchatelet as to what he thinks about this. My personal opinion - no harm having these macros for the sake of completeness even if unused.
Yes we don't support them for now. Since it may confuse people into thinking they are officially supported I will remove them.
Note that these macros are fetched almost verbatim from [[ https://github.com/google/cpu_features/blob/master/include/cpu_features_macros.h | Google's cpu_features ]] (a side project of mine) so it's easy to fetch them back if needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112818



More information about the libc-commits mailing list