[PATCH] D34075: [compiler-rt][builtins] Better Fuchsia support
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 19:43:14 PDT 2017
phosek created this revision.
Herald added subscribers: mgorny, dberris.
Add Fuchsia support to some builtins and avoid building builtins that are not and will never be used on Fuchsia.
Repository:
rL LLVM
https://reviews.llvm.org/D34075
Files:
lib/builtins/CMakeLists.txt
lib/builtins/int_util.c
Index: lib/builtins/int_util.c
===================================================================
--- lib/builtins/int_util.c
+++ lib/builtins/int_util.c
@@ -45,6 +45,13 @@
__assert_rtn(function, file, line, "libcompiler_rt abort");
}
+#elif __Fuchsia__
+
+__attribute__((weak)) __attribute__((visibility("hidden")))
+void compilerrt_abort_impl(const char *file, int line, const char *function) {
+ __builtin_trap();
+}
+
#else
/* Get the system definition of abort() */
Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -44,7 +44,6 @@
ashrti3.c
bswapdi2.c
bswapsi2.c
- clear_cache.c
clzdi2.c
clzsi2.c
clzti2.c
@@ -68,7 +67,6 @@
divti3.c
divtf3.c
divxc3.c
- eprintf.c
extendsfdf2.c
extendhfsf2.c
ffsdi2.c
@@ -191,7 +189,7 @@
"Skip the atomic builtin (this may be needed if system headers are unavailable)"
Off)
-if(NOT COMPILER_RT_BAREMETAL_BUILD)
+if(NOT FUCHSIA AND NOT COMPILER_RT_BAREMETAL_BUILD)
set(GENERIC_SOURCES
${GENERIC_SOURCES}
emutls.c
@@ -221,6 +219,13 @@
gcc_personality_v0.c)
endif ()
+if (NOT FUCHSIA)
+ set(GENERIC_SOURCES
+ ${GENERIC_SOURCES}
+ clear_cache.c
+ eprintf.c)
+endif()
+
if (NOT MSVC)
set(x86_64_SOURCES
x86_64/chkstk.S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34075.102105.patch
Type: text/x-patch
Size: 1374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170610/8d14e8c8/attachment.bin>
More information about the llvm-commits
mailing list