Skip to content

Commit

Permalink
Fix Visual Studio on ARM Compilation (#1315)
Browse files Browse the repository at this point in the history
* Fix Visual Studio on ARM Compilation.

This fixes Windows on ARM native Visual Studio compilation. The current #ifdef
logic assumes that Visual Studio always targets x86/x64, which is no longer the case.

Unfortunately based on:

https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170

there doesn't seem to be a single macro to test Intel vs ARM compilation.

With this change, OpenEXR compiles native to ARM on Windows and passes its
test suite.

Signed-off-by: Jean-Francois Panisset <[email protected]>

* Typo fix

Signed-off-by: Jean-Francois Panisset <[email protected]>

Signed-off-by: Jean-Francois Panisset <[email protected]>
  • Loading branch information
jfpanisset authored and cary-ilm committed Mar 5, 2023
1 parent ddab8d2 commit fa18978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfSystemSpecific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace {
: /* Clobber */);
}

#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && ( defined(_M_IX86) || ( defined(_M_AMD64) && !defined(_M_ARM64EC) ) )

// Helper functions for MSVC
void
Expand Down

0 comments on commit fa18978

Please sign in to comment.