[llvm] [Offload] Skip plugins when none requested (PR #199901)

Weronika Lewandowska via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 01:47:47 PDT 2026


wlemkows wrote:

> > Those macros should be available on Windows too...
> 
> Not when compiling with msvc.
> 
> msvc can be hardcoded to little endian, there is no big endian hardware currently supported by Microsoft.
> 
> This is used by Flang-RT (and Flang, they share headers):
> 
> https://github.com/llvm/llvm-project/blob/c25b0428e574a7c65e0197d53b781c7435f04300/flang/include/flang/Common/api-attrs.h#L207-L217
> 
> Eventually we hopefullly have a common infrastructure for runtimes. We unfortunately should not include LLVM's Support because any of those head may introduce a link-time dependency to the C++ standard library.
> 
> Clean solution: introduce KMP_BYTE_ORDER that falls back to KMP_LITTLE_ENDIAN with `defined(_MSC_VER)`. Search&replace everywhere.
> 
> Quick solution:
> 
> ```
> // TODO: ...
> #ifdef _MSC_VER
> #define __BIG_ENDIAN__ 4321
> #define __LITTLE_ENDIAN__ 1234
> #define __BYTE_ORDER__ __LITTLE_ENDIAN__
> #endif 
> ```

Please look at:
https://github.com/llvm/llvm-project/pull/202540

https://github.com/llvm/llvm-project/pull/199901


More information about the llvm-commits mailing list