Skip to content

Commit 2f9ed32

Browse files
committed
[LDC] compiler-rt: Work around compile errors for Android
1 parent 27581fc commit 2f9ed32

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ elseif(NOT WIN32)
593593
)
594594
endif()
595595

596+
if (ANDROID)
597+
# FIXME: clear_cache.c:87:20: error: write to reserved register 'R7'
598+
list(REMOVE_ITEM arm_SOURCES clear_cache.c)
599+
endif()
600+
596601
set(aarch64_SOURCES
597602
${GENERIC_TF_SOURCES}
598603
${GENERIC_SOURCES}

compiler-rt/lib/hwasan/hwasan_linux.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
# include <sys/prctl.h>
2727
# include <sys/resource.h>
2828
# include <sys/time.h>
29+
# if defined(__ANDROID__)
30+
# // SSIZE_MAX required by unistd.h; somehow including limits.h explicitly doesn't work either
31+
# if !defined(SSIZE_MAX) && defined(__LP64__)
32+
# define SSIZE_MAX 0x7fffffffffffffffL
33+
# endif
34+
# endif
2935
# include <unistd.h>
3036
# include <unwind.h>
3137

0 commit comments

Comments
 (0)