mirror of
https://github.com/corda/corda.git
synced 2025-06-05 00:50:52 +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
|
javac = javac
|
||||||
jar = jar
|
jar = jar
|
||||||
strip = :
|
strip = :
|
||||||
|
strip-all = --strip-all
|
||||||
show-size = :
|
show-size = :
|
||||||
|
|
||||||
rdynamic = -rdynamic
|
rdynamic = -rdynamic
|
||||||
@ -81,6 +82,7 @@ ifeq ($(platform),darwin)
|
|||||||
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
||||||
-I$(JAVA_HOME)/include/linux -I$(src)
|
-I$(JAVA_HOME)/include/linux -I$(src)
|
||||||
lflags = $(common-lflags) -ldl
|
lflags = $(common-lflags) -ldl
|
||||||
|
strip-all =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),windows)
|
ifeq ($(platform),windows)
|
||||||
@ -326,9 +328,7 @@ ifeq ($(platform),windows)
|
|||||||
else
|
else
|
||||||
$(cc) $(^) $(lflags) -o $(@)
|
$(cc) $(^) $(lflags) -o $(@)
|
||||||
endif
|
endif
|
||||||
ifneq ($(platform),darwin)
|
@$(strip) $(strip-all) $(@)
|
||||||
@$(strip) --strip-all $(@)
|
|
||||||
endif
|
|
||||||
@$(show-size) $(@)
|
@$(show-size) $(@)
|
||||||
|
|
||||||
$(generator): $(generator-objects)
|
$(generator): $(generator-objects)
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "processor.h"
|
#include "processor.h"
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
# define JNIEXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
# define JNIEXPORT __attribute__ ((visibility("default")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace vm;
|
using namespace vm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
11
src/common.h
11
src/common.h
@ -10,6 +10,17 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "math.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__
|
#ifdef __i386__
|
||||||
# define LD "d"
|
# define LD "d"
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
@ -4,12 +4,6 @@
|
|||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "processor.h"
|
#include "processor.h"
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
# define JNIEXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
# define JNIEXPORT __attribute__ ((visibility("default")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace vm;
|
using namespace vm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user