mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Makefile fix
This commit is contained in:
parent
0cbaad6495
commit
c5adad9dce
14
makefile
14
makefile
@ -51,7 +51,8 @@ ifeq ($(continuations),true)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
root := $(shell (cd .. && pwd))
|
root := $(shell (cd .. && pwd))
|
||||||
build = $(build-prefix)build/$(platform)-$(arch)$(options)
|
build = build/$(platform)-$(arch)$(options)
|
||||||
|
host-build-root = $(build)/host
|
||||||
classpath-build = $(build)/classpath
|
classpath-build = $(build)/classpath
|
||||||
test-build = $(build)/test
|
test-build = $(build)/test
|
||||||
src = src
|
src = src
|
||||||
@ -640,7 +641,7 @@ ifeq ($(platform),wp8)
|
|||||||
ms_cl_compiler = wp8
|
ms_cl_compiler = wp8
|
||||||
use-lto = false
|
use-lto = false
|
||||||
supports_avian_executable = false
|
supports_avian_executable = false
|
||||||
process = interpret
|
process = compile
|
||||||
ifneq ($(process),compile)
|
ifneq ($(process),compile)
|
||||||
options := -$(process)
|
options := -$(process)
|
||||||
endif
|
endif
|
||||||
@ -918,6 +919,9 @@ ifeq ($(process),compile)
|
|||||||
vm-asm-sources += $(src)/compile-$(asm).$(asm-format)
|
vm-asm-sources += $(src)/compile-$(asm).$(asm-format)
|
||||||
endif
|
endif
|
||||||
cflags += -DAVIAN_PROCESS_$(process)
|
cflags += -DAVIAN_PROCESS_$(process)
|
||||||
|
ifdef aot_only
|
||||||
|
cflags += -DAVIAN_AOT_ONLY
|
||||||
|
endif
|
||||||
|
|
||||||
vm-cpp-objects = $(call cpp-objects,$(vm-sources),$(src),$(build))
|
vm-cpp-objects = $(call cpp-objects,$(vm-sources),$(src),$(build))
|
||||||
vm-asm-objects = $(call asm-objects,$(vm-asm-sources),$(src),$(build))
|
vm-asm-objects = $(call asm-objects,$(vm-asm-sources),$(src),$(build))
|
||||||
@ -1430,7 +1434,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(bootimage-object) $(codeimage-object): $(bootimage-generator)
|
$(bootimage-object) $(codeimage-object): $(bootimage-generator)
|
||||||
@echo "generating bootimage and codeimage binaries using $(<)"
|
@echo "generating bootimage and codeimage binaries from $(classpath-build) using $(<)"
|
||||||
$(<) -cp $(classpath-build) -bootimage $(bootimage-object) -codeimage $(codeimage-object) \
|
$(<) -cp $(classpath-build) -bootimage $(bootimage-object) -codeimage $(codeimage-object) \
|
||||||
-bootimage-symbols $(bootimage-symbols) \
|
-bootimage-symbols $(bootimage-symbols) \
|
||||||
-codeimage-symbols $(codeimage-symbols)
|
-codeimage-symbols $(codeimage-symbols)
|
||||||
@ -1459,9 +1463,9 @@ endif
|
|||||||
$(strip) $(strip-all) $(@)
|
$(strip) $(strip-all) $(@)
|
||||||
|
|
||||||
$(bootimage-generator): $(bootimage-generator-objects)
|
$(bootimage-generator): $(bootimage-generator-objects)
|
||||||
echo arch=$(arch) platform=$(platform)
|
echo building $(bootimage-generator) arch=$(build-arch) platform=$(bootimage-platform)
|
||||||
$(MAKE) mode=$(mode) \
|
$(MAKE) mode=$(mode) \
|
||||||
build-prefix=$(build)/host/ \
|
build=$(host-build-root) \
|
||||||
arch=$(build-arch) \
|
arch=$(build-arch) \
|
||||||
target-arch=$(arch) \
|
target-arch=$(arch) \
|
||||||
platform=$(bootimage-platform) \
|
platform=$(bootimage-platform) \
|
||||||
|
@ -116,7 +116,7 @@ loadMemoryBarrier()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
// http://code.google.com/p/android/issues/detail?id=1803
|
// http://code.google.com/p/android/issues/detail?id=1803
|
||||||
@ -136,7 +136,7 @@ syncInstructionCache(const void* start, unsigned size)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // AVIAN_PROCESS_compile
|
#endif // AVIAN_AOT_ONLY
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
|
typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
|
||||||
|
@ -97,7 +97,7 @@ class System {
|
|||||||
virtual void disposeAll() = 0;
|
virtual void disposeAll() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
class SignalHandler {
|
class SignalHandler {
|
||||||
public:
|
public:
|
||||||
virtual bool handleSignal(void** ip, void** frame, void** stack,
|
virtual bool handleSignal(void** ip, void** frame, void** stack,
|
||||||
@ -123,7 +123,7 @@ class System {
|
|||||||
virtual bool success(Status) = 0;
|
virtual bool success(Status) = 0;
|
||||||
virtual void* tryAllocate(unsigned sizeInBytes) = 0;
|
virtual void* tryAllocate(unsigned sizeInBytes) = 0;
|
||||||
virtual void free(const void* p) = 0;
|
virtual void free(const void* p) = 0;
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
virtual void* tryAllocateExecutable(unsigned sizeInBytes) = 0;
|
virtual void* tryAllocateExecutable(unsigned sizeInBytes) = 0;
|
||||||
virtual void freeExecutable(const void* p, unsigned sizeInBytes) = 0;
|
virtual void freeExecutable(const void* p, unsigned sizeInBytes) = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -132,7 +132,7 @@ class System {
|
|||||||
virtual Status make(Mutex**) = 0;
|
virtual Status make(Mutex**) = 0;
|
||||||
virtual Status make(Monitor**) = 0;
|
virtual Status make(Monitor**) = 0;
|
||||||
virtual Status make(Local**) = 0;
|
virtual Status make(Local**) = 0;
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
virtual Status handleSegFault(SignalHandler* handler) = 0;
|
virtual Status handleSegFault(SignalHandler* handler) = 0;
|
||||||
virtual Status handleDivideByZero(SignalHandler* handler) = 0;
|
virtual Status handleDivideByZero(SignalHandler* handler) = 0;
|
||||||
virtual Status visit(Thread* thread, Thread* target,
|
virtual Status visit(Thread* thread, Thread* target,
|
||||||
|
@ -114,7 +114,7 @@ class MutexResource {
|
|||||||
HANDLE m;
|
HANDLE m;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
const unsigned SegFaultIndex = 0;
|
const unsigned SegFaultIndex = 0;
|
||||||
const unsigned DivideByZeroIndex = 1;
|
const unsigned DivideByZeroIndex = 1;
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ const unsigned HandlerCount = 2;
|
|||||||
class MySystem;
|
class MySystem;
|
||||||
MySystem* system;
|
MySystem* system;
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
LONG CALLBACK
|
LONG CALLBACK
|
||||||
handleException(LPEXCEPTION_POINTERS e);
|
handleException(LPEXCEPTION_POINTERS e);
|
||||||
#endif
|
#endif
|
||||||
@ -628,7 +628,7 @@ class MySystem: public System {
|
|||||||
};
|
};
|
||||||
|
|
||||||
MySystem(const char* crashDumpDirectory):
|
MySystem(const char* crashDumpDirectory):
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
oldHandler(0),
|
oldHandler(0),
|
||||||
#endif
|
#endif
|
||||||
crashDumpDirectory(crashDumpDirectory)
|
crashDumpDirectory(crashDumpDirectory)
|
||||||
@ -636,14 +636,14 @@ class MySystem: public System {
|
|||||||
expect(this, system == 0);
|
expect(this, system == 0);
|
||||||
system = this;
|
system = this;
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
memset(handlers, 0, sizeof(handlers));
|
memset(handlers, 0, sizeof(handlers));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mutex = CreateMutex(0, false, 0);
|
mutex = CreateMutex(0, false, 0);
|
||||||
assert(this, mutex);
|
assert(this, mutex);
|
||||||
}
|
}
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
bool findHandler() {
|
bool findHandler() {
|
||||||
for (unsigned i = 0; i < HandlerCount; ++i) {
|
for (unsigned i = 0; i < HandlerCount; ++i) {
|
||||||
if (handlers[i]) return true;
|
if (handlers[i]) return true;
|
||||||
@ -692,7 +692,7 @@ class MySystem: public System {
|
|||||||
if (p) ::free(const_cast<void*>(p));
|
if (p) ::free(const_cast<void*>(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
virtual void* tryAllocateExecutable(unsigned sizeInBytes) {
|
virtual void* tryAllocateExecutable(unsigned sizeInBytes) {
|
||||||
return VirtualAlloc
|
return VirtualAlloc
|
||||||
(0, sizeInBytes, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
(0, sizeInBytes, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||||
@ -742,7 +742,7 @@ class MySystem: public System {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
virtual Status handleSegFault(SignalHandler* handler) {
|
virtual Status handleSegFault(SignalHandler* handler) {
|
||||||
return registerHandler(handler, SegFaultIndex);
|
return registerHandler(handler, SegFaultIndex);
|
||||||
}
|
}
|
||||||
@ -1017,14 +1017,14 @@ class MySystem: public System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HANDLE mutex;
|
HANDLE mutex;
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
SignalHandler* handlers[HandlerCount];
|
SignalHandler* handlers[HandlerCount];
|
||||||
LPTOP_LEVEL_EXCEPTION_FILTER oldHandler;
|
LPTOP_LEVEL_EXCEPTION_FILTER oldHandler;
|
||||||
#endif
|
#endif
|
||||||
const char* crashDumpDirectory;
|
const char* crashDumpDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(AVIAN_PROCESS_compile)
|
#if !defined(AVIAN_AOT_ONLY)
|
||||||
|
|
||||||
#pragma pack(push,4)
|
#pragma pack(push,4)
|
||||||
struct MINIDUMP_EXCEPTION_INFORMATION {
|
struct MINIDUMP_EXCEPTION_INFORMATION {
|
||||||
|
Loading…
Reference in New Issue
Block a user