Skip to content

Commit

Permalink
[release/6.0-preview5] [build] Define NO_UNALIGNED_ACCESS for 32-bit …
Browse files Browse the repository at this point in the history
…arm platforms (#52942)

Co-authored-by: Aleksey Kliger <[email protected]>
  • Loading branch information
github-actions[bot] and lambdageek authored Jun 1, 2021
1 parent 4ce05fa commit ec3e0b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(HOST_ARM64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
set(HOST_ARM 1)
# fixme: use separate defines for host/target
set(NO_UNALIGNED_ACCESS 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
set(HOST_S390X 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "wasm")
Expand Down Expand Up @@ -413,6 +415,8 @@ elseif(TARGET_ARCH MATCHES "arm")
add_definitions("-DARM_FPU_VFP=1")
set(TARGET_SIZEOF_VOID_P 4)
set(SIZEOF_REGISTER 4)
# fixme: use separate defines for host/target
set(NO_UNALIGNED_ACCESS 1)
elseif(TARGET_ARCH STREQUAL "s390x")
set(TARGET_S390X 1)
set(MONO_ARCHITECTURE "\"s390x\"")
Expand Down
3 changes: 3 additions & 0 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,9 @@
/* size of target machine integer registers */
#define SIZEOF_REGISTER @SIZEOF_REGISTER@

/* host or target doesn't allow unaligned memory access */
#cmakedefine NO_UNALIGNED_ACCESS 1

/* Support for the visibility ("hidden") attribute */
#cmakedefine HAVE_VISIBILITY_HIDDEN 1

Expand Down

0 comments on commit ec3e0b2

Please sign in to comment.