mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
Factored JNIEXPORT into one place. Adopted the visbility attribute that
should allow strip to work on Mac OS X
This commit is contained in:
parent
7a4cca45c2
commit
7f33b7371b
6
makefile
6
makefile
@ -44,6 +44,7 @@ db = gdb --args
|
||||
javac = javac
|
||||
jar = jar
|
||||
strip = :
|
||||
strip-all = --strip-all
|
||||
show-size = :
|
||||
|
||||
rdynamic = -rdynamic
|
||||
@ -81,6 +82,7 @@ ifeq ($(platform),darwin)
|
||||
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
||||
-I$(JAVA_HOME)/include/linux -I$(src)
|
||||
lflags = $(common-lflags) -ldl
|
||||
strip-all =
|
||||
endif
|
||||
|
||||
ifeq ($(platform),windows)
|
||||
@ -326,9 +328,7 @@ ifeq ($(platform),windows)
|
||||
else
|
||||
$(cc) $(^) $(lflags) -o $(@)
|
||||
endif
|
||||
ifneq ($(platform),darwin)
|
||||
@$(strip) --strip-all $(@)
|
||||
endif
|
||||
@$(strip) $(strip-all) $(@)
|
||||
@$(show-size) $(@)
|
||||
|
||||
$(generator): $(generator-objects)
|
||||
|
@ -2,12 +2,6 @@
|
||||
#include "constants.h"
|
||||
#include "processor.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# define JNIEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define JNIEXPORT __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
using namespace vm;
|
||||
|
||||
namespace {
|
||||
|
11
src/common.h
11
src/common.h
@ -10,6 +10,17 @@
|
||||
#include "types.h"
|
||||
#include "math.h"
|
||||
|
||||
#undef JNIEXPORT
|
||||
#ifdef __MINGW32__
|
||||
# define JNIEXPORT __declspec(dllexport)
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
# define JNIEXPORT __attribute__ ((visibility("used")))
|
||||
#else
|
||||
# define JNIEXPORT __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
# define LD "d"
|
||||
#ifdef __APPLE__
|
||||
|
@ -4,12 +4,6 @@
|
||||
#include "constants.h"
|
||||
#include "processor.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# define JNIEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define JNIEXPORT __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
using namespace vm;
|
||||
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user