Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Improve x86-linux build support.
Reason for change
We provide CA_BUILD_32_BITS to attempt to build a 32-bit version of oneAPI Construction Kit, but this is fragile and does not always work. Notably, this has stopped working in our internal CI because CMake sometimes fails to pick up libraries required by LLVM.
Description of change
Regular cross compilation which we use for other targets is more reliable. To allow this, add an x86-toolchain.cmake file.
Anything else we should know?
This also reveals that our x86 detection was incomplete and would result in oneAPI Construction Kit failing to build on native 32-bit platforms, because CMAKE_SYSTEM_PROCESSOR will not be "x86", it will be e.g. "i686". Account for this in the detection.
Checklist