[compiler-rt] r186463 - Give compiler-rt a chance to compile with mingw-w64.
Anton Korobeynikov
asl at math.spbu.ru
Tue Jul 16 15:37:55 PDT 2013
Author: asl
Date: Tue Jul 16 17:37:55 2013
New Revision: 186463
URL: http://llvm.org/viewvc/llvm-project?rev=186463&view=rev
Log:
Give compiler-rt a chance to compile with mingw-w64.
Patch by C. Bergström!
Modified:
compiler-rt/trunk/lib/eprintf.c
compiler-rt/trunk/lib/int_util.c
Modified: compiler-rt/trunk/lib/eprintf.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/eprintf.c?rev=186463&r1=186462&r2=186463&view=diff
==============================================================================
--- compiler-rt/trunk/lib/eprintf.c (original)
+++ compiler-rt/trunk/lib/eprintf.c Tue Jul 16 17:37:55 2013
@@ -22,7 +22,9 @@
* It should never be exported from a dylib, so it is marked
* visibility hidden.
*/
+#ifndef _WIN32
__attribute__((visibility("hidden")))
+#endif
void __eprintf(const char* format, const char* assertion_expression,
const char* line, const char* file)
{
Modified: compiler-rt/trunk/lib/int_util.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_util.c?rev=186463&r1=186462&r2=186463&view=diff
==============================================================================
--- compiler-rt/trunk/lib/int_util.c (original)
+++ compiler-rt/trunk/lib/int_util.c Tue Jul 16 17:37:55 2013
@@ -24,7 +24,9 @@
#ifdef KERNEL_USE
extern void panic(const char *, ...) __attribute__((noreturn));
+#ifndef _WIN32
__attribute__((visibility("hidden")))
+#endif
void compilerrt_abort_impl(const char *file, int line, const char *function) {
panic("%s:%d: abort in %s", file, line, function);
}
@@ -35,8 +37,10 @@ void compilerrt_abort_impl(const char *f
extern void __assert_rtn(const char *func, const char *file,
int line, const char * message) __attribute__((noreturn));
+#ifndef _WIN32
__attribute__((weak))
__attribute__((visibility("hidden")))
+#endif
void compilerrt_abort_impl(const char *file, int line, const char *function) {
__assert_rtn(function, file, line, "libcompiler_rt abort");
}
@@ -47,8 +51,10 @@ void compilerrt_abort_impl(const char *f
/* Get the system definition of abort() */
#include <stdlib.h>
+#ifndef _WIN32
__attribute__((weak))
__attribute__((visibility("hidden")))
+#endif
void compilerrt_abort_impl(const char *file, int line, const char *function) {
abort();
}
More information about the llvm-commits
mailing list