Skip to content

Commit 133dae7

Browse files
committed
[LDC] compiler-rt: Work around compile errors for Android
1 parent c6f3c3b commit 133dae7

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
@@ -572,6 +572,11 @@ elseif(NOT WIN32)
572572
)
573573
endif()
574574

575+
if (ANDROID)
576+
# FIXME: clear_cache.c:87:20: error: write to reserved register 'R7'
577+
list(REMOVE_ITEM arm_SOURCES clear_cache.c)
578+
endif()
579+
575580
set(aarch64_SOURCES
576581
${GENERIC_TF_SOURCES}
577582
${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)