View in context in the libbitcoin Slack #general mirror.
/// Map standard XCPU defines for intrinsics usage.
/// vc++: There are no native flags for SHA and SSE41.
#if defined(HAVE_XCPU)
// -msha
// vc++: SHANI not independently configurable (requires custom option).
#if defined(__SHA__)
#define HAVE_SHANI
#define HAVE_SHA
#endif
// -mavx512bw
// vc++: Advanced Vector Extensions 512 (X86/X64) (/arch:AVX512)
#if defined(__AVX512BW__)
#define HAVE_AVX512
#define HAVE_512
#endif
// -mavx2
// vc++: Advanced Vector Extensions 2 (X86/X64) (/arch:AVX2)
#if defined(__AVX2__)
#define HAVE_AVX2
#define HAVE_256
#endif
// -msse4.1
// vc++: Use Advanced Vector Extensions (X86/X64) (/arch:AVX).
#if defined(__SSE4_1__)
#define HAVE_SSE4
#define HAVE_128
#endif
#endif
/// Map standard ARM defines for intrinsics usage.
/// SVE maximum width is not detectable (requires custom options).
#if defined(HAVE_ARM)
// -march=armv8-a+crypto
// Requires 64 bit build.
#if defined(__ARM_FEATURE_CRYPTO)
#define HAVE_CRYPTO
#define HAVE_SHA
#endif
// -march=armv8-a+sve
// Requires 64 bit build.
#if defined(__ARM_FEATURE_SVE)
#define HAVE_SVE
#endif
// -march=armv8-a (64 bit)
// -march=armv7-a -mfpu=neon -mfloat-abi=hard (32 bit)
#if defined(__ARM_NEON)
#define HAVE_NEON
#define HAVE_128
#endif
#endifCMakePresets.json with "architecture": { "value": "arm64ec", "strategy": "external" } and set environment variables CXXFLAGS and CFLAGS to /arm64EC. /machine:arm64x flag to combine the Arm64 and x64 artifacts into a single binary that can run on Arm64 devices. auto_link.hpp. It constructs the lib path in parts, including this:
#if defined( _M_IX86 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x32"
#elif defined( _M_X64 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x64"
#elif defined( _M_ARM )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a32"
#elif defined( _M_ARM64 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a64"
#endif
...
#if defined(BOOST_LIB_NAME) \
&& defined(BOOST_LIB_PREFIX) \
&& defined(BOOST_LIB_TOOLSET) \
&& defined(BOOST_LIB_THREAD_OPT) \
&& defined(BOOST_LIB_RT_OPT) \
&& defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \
&& defined(BOOST_LIB_VERSION)_M_ARM64 is defined (it is) boost switches to -a64. The issue is simply that these libs are not in the NuGet package. But good to know that boost does expect and therefore build them. I could probably copy the x64 into the expected path and link with ARM64EC.secp256k1) we produce the paths in the targets file (as intended), using a similar naming convention.