diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake --- a/cmake/AwsCFlags.cmake (revision 4a21a1c0757083a16497fea27886f5f20ccdf334) +++ b/cmake/AwsCFlags.cmake (date 1618758078727) @@ -70,9 +70,11 @@ # -moutline-atomics generates code for both older load/store exclusive atomics and also # Arm's Large System Extensions (LSE) which scale substantially better on large core count systems - check_c_compiler_flag(-moutline-atomics HAS_MOUTLINE_ATOMICS) - if (HAS_MOUTLINE_ATOMICS) - list(APPEND AWS_C_FLAGS -moutline-atomics) + if(NOT EMSCRIPTEN AND NOT ANDROID) + check_c_compiler_flag(-moutline-atomics HAS_MOUTLINE_ATOMICS) + if (HAS_MOUTLINE_ATOMICS) + list(APPEND AWS_C_FLAGS -moutline-atomics) + endif() endif() endif()