Skip to content

Conversation

@anthony-linaro
Copy link
Contributor

Description

On Windows ARM64, when building with clang-cl, LLVM can sometimes use it's own built-in intrin.h file, located in <LLVM INSTALL PATH>\lib\clang\20\include.

This file, as opposed to the built-in one that ships with the Windows SDK that MSVC uses, doesn't have an inclusion of arm_neon.h. This PR adds a small check to the simd.h file to include this header.

I didn't add an extra check to specifically only do this for clang, as it seemed a little messy - I can do this, but it's relatively harmless for MSVC given intrin.h includes it anyway for that compiler.

This change has already been in place for some time in Blender, this is just an upstreaming PR for that change: https://projects.blender.org/blender/blender/src/commit/ea604b6b80e49adb51d12df4e4edd5af1c51f446/build_files/build_environment/patches/oiio_windows_arm64.diff

Tests

n/a

Checklist:

  • I have read the contribution guidelines.
  • [ ] I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • [ ] I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • [ ] If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 4, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: anthony-linaro / name: Anthony Roberts (05c44c7)

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Can you do the CLA signing so I can merge it?

@anthony-linaro
Copy link
Contributor Author

anthony-linaro commented Apr 4, 2025

Yes - just waiting on the relevant person at our company to check it all off for me on the EasyCLA dashboard!

@lgritz
Copy link
Collaborator

lgritz commented Apr 16, 2025

Any luck, @anthony-linaro ? (No rush, just letting you know we have not forgotten about you.)

@lgritz lgritz added build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. windows Problems specific to MS Windows OS labels Apr 21, 2025
@anthony-linaro
Copy link
Contributor Author

Not yet, sorry! Chasing with management chain

@lgritz
Copy link
Collaborator

lgritz commented May 21, 2025

@anthony-linaro Checking in. Still no rush, just making sure neither of us forgets completely about it.

@anthony-linaro
Copy link
Contributor Author

Sorry no progress :( apparently they're having some sort of issues with the corporate CLA portal

@anthony-linaro
Copy link
Contributor Author

@lgritz The CLA issue is now resolved, apologies for the delay!

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lgritz lgritz merged commit 1516226 into AcademySoftwareFoundation:main Jun 19, 2025
27 of 28 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Jun 20, 2025
…SoftwareFoundation#4691)

On Windows ARM64, when building with clang-cl, LLVM can sometimes use it's own built-in intrin.h file, located in `<LLVM INSTALL PATH>\lib\clang\20\include`.

This file, as opposed to the built-in one that ships with the Windows SDK that MSVC uses, doesn't have an inclusion of arm_neon.h. This PR adds a small check to the simd.h file to include this header.

I didn't add an extra check to specifically only do this for clang, as it seemed a little messy - I can do this, but it's relatively harmless for MSVC given intrin.h includes it anyway for that compiler.

This change has already been in place for some time in Blender, this is just an upstreaming PR for that change: https://projects.blender.org/blender/blender/src/commit/ea604b6b80e49adb51d12df4e4edd5af1c51f446/build_files/build_environment/patches/oiio_windows_arm64.diff
zachlewis pushed a commit to zachlewis/OpenImageIO that referenced this pull request Aug 1, 2025
…SoftwareFoundation#4691)

On Windows ARM64, when building with clang-cl, LLVM can sometimes use it's own built-in intrin.h file, located in `<LLVM INSTALL PATH>\lib\clang\20\include`.

This file, as opposed to the built-in one that ships with the Windows SDK that MSVC uses, doesn't have an inclusion of arm_neon.h. This PR adds a small check to the simd.h file to include this header.

I didn't add an extra check to specifically only do this for clang, as it seemed a little messy - I can do this, but it's relatively harmless for MSVC given intrin.h includes it anyway for that compiler.

This change has already been in place for some time in Blender, this is just an upstreaming PR for that change: https://projects.blender.org/blender/blender/src/commit/ea604b6b80e49adb51d12df4e4edd5af1c51f446/build_files/build_environment/patches/oiio_windows_arm64.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. windows Problems specific to MS Windows OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants