Skip to content

Commit 0937935

Browse files
lgritzssh4net
authored andcommitted
fix(win): oiiotool --buildinfo misreported platform on MSVS (AcademySoftwareFoundation#5027)
Need to test some MSVS-specific macros to determine what architecture to report. And especially, if it doesn't know the processor architecture, it still should be *appending* that to the platform, not replacing it! This caused MSVS-compiled OIIO on Windows to report "unknown arch?" Signed-off-by: Larry Gritz <lg@larrygritz.com> Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
1 parent 65a46fc commit 0937935

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/libOpenImageIO/imageio.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,15 @@ oiio_build_platform()
258258
platform = "UnknownOS";
259259
#endif
260260
platform += "/";
261-
#if defined(__x86_64__)
261+
#if defined(__x86_64__) || defined(_M_AMD64)
262262
platform += "x86_64";
263-
#elif defined(__i386__)
263+
#elif defined(__i386__) || defined(_M_IX86)
264264
platform += "i386";
265-
#elif defined(_M_ARM64) || defined(__aarch64__) || defined(__aarch64)
265+
#elif defined(_M_ARM64) || defined(__aarch64__) || defined(__aarch64) \
266+
|| defined(__ARM_ARCH)
266267
platform += "ARM";
267268
#else
268-
platform = "unknown arch?";
269+
platform += "unknown arch?";
269270
#endif
270271
return platform;
271272
}

0 commit comments

Comments
 (0)