Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 27201c8

Browse files
Treehugger RobotGerrit Code Review
Treehugger Robot
authored and
Gerrit Code Review
committed
Merge "Fix libffi issues with dynamic linking (now with mac support)"
2 parents 411cc28 + 1b454c4 commit 27201c8

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

Android.bp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ genrule {
2020
tool_files: ["gen_ffi_header.sh"],
2121
}
2222

23-
cc_library_static {
23+
cc_library {
2424
name: "libffi",
2525
host_supported: true,
2626
vendor_available: true,

linux-arm/fficonfig.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define HAVE_DLFCN_H 1
4242

4343
/* Define if __attribute__((visibility("hidden"))) is supported. */
44-
#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
44+
#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
4545

4646
/* Define to 1 if you have the <inttypes.h> header file. */
4747
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
146146

147147
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
148148
#ifdef LIBFFI_ASM
149+
#ifdef __APPLE__
150+
#define FFI_HIDDEN(name) .private_extern name
151+
#else
149152
#define FFI_HIDDEN(name) .hidden name
153+
#endif
150154
#else
151155
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
152156
#endif

linux-arm64/fficonfig.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define HAVE_DLFCN_H 1
4242

4343
/* Define if __attribute__((visibility("hidden"))) is supported. */
44-
#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
44+
#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
4545

4646
/* Define to 1 if you have the <inttypes.h> header file. */
4747
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
146146

147147
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
148148
#ifdef LIBFFI_ASM
149+
#ifdef __APPLE__
150+
#define FFI_HIDDEN(name) .private_extern name
151+
#else
149152
#define FFI_HIDDEN(name) .hidden name
153+
#endif
150154
#else
151155
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
152156
#endif

linux-x86/fficonfig.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define HAVE_DLFCN_H 1
4242

4343
/* Define if __attribute__((visibility("hidden"))) is supported. */
44-
#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
44+
#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
4545

4646
/* Define to 1 if you have the <inttypes.h> header file. */
4747
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
146146

147147
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
148148
#ifdef LIBFFI_ASM
149+
#ifdef __APPLE__
150+
#define FFI_HIDDEN(name) .private_extern name
151+
#else
149152
#define FFI_HIDDEN(name) .hidden name
153+
#endif
150154
#else
151155
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
152156
#endif

0 commit comments

Comments
 (0)