Fix OPENSSL_NO_ASM build and promote to a cmake build flag.

Just changing preprocessor definitions doesn't exclude the assembly files.

BUG=484327

Change-Id: I98453d291a6afb8dc8beb179f931c74301a7f434
Reviewed-on: https://boringssl-review.googlesource.com/4610
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-05-04 15:16:57 -04:00 committed by Adam Langley
parent a921d550d0
commit 27b08e9ecf
2 changed files with 6 additions and 1 deletions

View File

@ -110,6 +110,11 @@ if (${ARCH} STREQUAL "x86" AND APPLE)
set(ARCH "x86_64")
endif()
if (OPENSSL_NO_ASM)
add_definitions(-DOPENSSL_NO_ASM)
set(ARCH "generic")
endif()
add_subdirectory(crypto)
add_subdirectory(ssl)
add_subdirectory(ssl/test)

View File

@ -20,7 +20,7 @@
#include <openssl/cpu.h>
#if defined(OPENSSL_X86_64)
#if defined(OPENSSL_X86_64) && !defined(OPENSSL_NO_ASM)
int CRYPTO_have_hwrand(void) {
return (OPENSSL_ia32cap_P[1] & (1u << 30)) != 0;