darling-xnu/tests/posix_spawn_archpref_helper.c
2023-05-16 21:41:14 -07:00

23 lines
461 B
C

#include <spawn.h>
/*
* Returns the subcpu type for the architecture for which the
* binary was compiled.
*/
int
main(void)
{
#if defined(__x86_64__)
return CPU_SUBTYPE_X86_64_ALL;
#elif __arm64e__
return CPU_SUBTYPE_ARM64E;
#elif defined(__arm64__) && defined(__LP64__)
return CPU_SUBTYPE_ARM64_ALL;
#elif defined(__arm64__)
return CPU_SUBTYPE_ARM64_32_ALL;
#elif defined(__arm__)
return CPU_SUBTYPE_ARM_V7K;
#else
#error unknown architecture
#endif
}