Skip to content

Commit

Permalink
Added intel and arm detection flags to config.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Jan 29, 2024
1 parent d6b9399 commit ddb7d02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/AwsFeatureTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ check_c_source_compiles("
}
" AWS_ARCH_INTEL)

check_c_source_compiles("
int main() {
#if !(defined(__x86_64__) || defined(_M_X64))
# error \"not intel\"
#endif
return 0;
}
" AWS_ARCH_INTEL_X64)

check_c_source_compiles("
int main() {
#if !(defined(__aarch64__) || defined(_M_ARM64))
Expand Down
4 changes: 4 additions & 0 deletions include/aws/common/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
#cmakedefine AWS_HAVE_CLMUL
#cmakedefine AWS_HAVE_ARM32_CRC
#cmakedefine AWS_HAVE_ARMv8_1
#cmakedefine AWS_ARCH_ARM64
#cmakedefine AWS_ARCH_INTEL
#cmakedefine AWS_ARCH_INTEL_X64

#endif

0 comments on commit ddb7d02

Please sign in to comment.