mirror of
https://github.com/corda/corda.git
synced 2025-01-17 02:09:50 +00:00
Makefile changes, added additional compiler flags
This commit is contained in:
parent
4228f69a0d
commit
aaa60aebff
110
makefile
110
makefile
@ -50,6 +50,7 @@ ifeq ($(continuations),true)
|
|||||||
options := $(options)-continuations
|
options := $(options)-continuations
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
aot-only = false
|
||||||
root := $(shell (cd .. && pwd))
|
root := $(shell (cd .. && pwd))
|
||||||
build = build/$(platform)-$(arch)$(options)
|
build = build/$(platform)-$(arch)$(options)
|
||||||
host-build-root = $(build)/host
|
host-build-root = $(build)/host
|
||||||
@ -539,7 +540,6 @@ ifeq ($(platform),windows)
|
|||||||
lib = "$(win32)/lib"
|
lib = "$(win32)/lib"
|
||||||
|
|
||||||
embed-prefix = c:/avian-embedded
|
embed-prefix = c:/avian-embedded
|
||||||
|
|
||||||
system = windows
|
system = windows
|
||||||
|
|
||||||
so-prefix =
|
so-prefix =
|
||||||
@ -642,7 +642,7 @@ ifeq ($(platform),wp8)
|
|||||||
use-lto = false
|
use-lto = false
|
||||||
supports_avian_executable = false
|
supports_avian_executable = false
|
||||||
process = compile
|
process = compile
|
||||||
aot_only = true
|
aot-only = true
|
||||||
ifneq ($(process),compile)
|
ifneq ($(process),compile)
|
||||||
options := -$(process)
|
options := -$(process)
|
||||||
endif
|
endif
|
||||||
@ -676,11 +676,16 @@ ifeq ($(platform),wp8)
|
|||||||
vc_arch =
|
vc_arch =
|
||||||
w8kit_arch = x86
|
w8kit_arch = x86
|
||||||
deps_arch = x86
|
deps_arch = x86
|
||||||
asmflags = $(target-cflags) -safeseh
|
asmflags = $(target-cflags) -safeseh -nologo -Gd
|
||||||
as = "$$(cygpath -u "$(WP80_SDK)\bin\ml.exe")"
|
as = "$$(cygpath -u "$(WP80_SDK)\bin\ml.exe")"
|
||||||
cxx = "$$(cygpath -u "$(WP80_SDK)\bin\cl.exe")"
|
cxx = "$$(cygpath -u "$(WP80_SDK)\bin\cl.exe")"
|
||||||
ld = "$$(cygpath -u "$(WP80_SDK)\bin\link.exe")"
|
ld = "$$(cygpath -u "$(WP80_SDK)\bin\link.exe")"
|
||||||
asmflags += -nologo
|
ifeq ($(mode),debug)
|
||||||
|
asmflags += -Zd
|
||||||
|
endif
|
||||||
|
ifeq ($(mode),debug-fast)
|
||||||
|
asmflags += -Zd
|
||||||
|
endif
|
||||||
asm-output = $(output)
|
asm-output = $(output)
|
||||||
machine_type = X86
|
machine_type = X86
|
||||||
endif
|
endif
|
||||||
@ -700,7 +705,8 @@ ifeq ($(platform),wp8)
|
|||||||
-Fd$(build)/$(name).pdb -I"$(shell $(windows-path) "$(wp8)/include")" -I$(src) -I$(classpath-src) \
|
-Fd$(build)/$(name).pdb -I"$(shell $(windows-path) "$(wp8)/include")" -I$(src) -I$(classpath-src) \
|
||||||
-I"$(build)" \
|
-I"$(build)" \
|
||||||
-I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \
|
-I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \
|
||||||
-DTARGET_BYTES_PER_WORD=$(pointer-size)
|
-DTARGET_BYTES_PER_WORD=$(pointer-size) \
|
||||||
|
-Gd
|
||||||
|
|
||||||
common-lflags = $(classpath-lflags)
|
common-lflags = $(classpath-lflags)
|
||||||
|
|
||||||
@ -783,6 +789,52 @@ ifeq ($(platform),wp8)
|
|||||||
strip = :
|
strip = :
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef msvc
|
||||||
|
no-error =
|
||||||
|
windows-path = $(native-path)
|
||||||
|
windows-java-home := $(shell $(windows-path) "$(JAVA_HOME)")
|
||||||
|
zlib := $(shell $(windows-path) "$(win32)/msvc")
|
||||||
|
ms_cl_compiler = regular
|
||||||
|
cxx = "$(msvc)/BIN/cl.exe"
|
||||||
|
cc = $(cxx)
|
||||||
|
ld = "$(msvc)/BIN/link.exe"
|
||||||
|
mt = "mt.exe"
|
||||||
|
manifest-flags = -MANIFEST -MANIFESTFILE:$(@).manifest
|
||||||
|
cflags = -nologo -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \
|
||||||
|
-DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \
|
||||||
|
-DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \
|
||||||
|
-Fd$(build)/$(name).pdb -I"$(zlib)/include" -I$(src) -I$(classpath-src) \
|
||||||
|
-I"$(build)" \
|
||||||
|
-I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \
|
||||||
|
-DTARGET_BYTES_PER_WORD=$(pointer-size)
|
||||||
|
|
||||||
|
ifneq ($(lzma),)
|
||||||
|
cflags += -I$(shell $(windows-path) "$(lzma)")
|
||||||
|
endif
|
||||||
|
|
||||||
|
shared = -dll
|
||||||
|
lflags = -nologo -LIBPATH:"$(zlib)/lib" -DEFAULTLIB:ws2_32 \
|
||||||
|
-DEFAULTLIB:zlib -DEFAULTLIB:user32 -MANIFEST -debug
|
||||||
|
output = -Fo$(1)
|
||||||
|
|
||||||
|
ifeq ($(mode),debug)
|
||||||
|
cflags += -Od -Zi -MDd
|
||||||
|
endif
|
||||||
|
ifeq ($(mode),debug-fast)
|
||||||
|
cflags += -Od -Zi -DNDEBUG
|
||||||
|
endif
|
||||||
|
ifeq ($(mode),fast)
|
||||||
|
cflags += -O2 -GL -Zi -DNDEBUG
|
||||||
|
lflags += -LTCG
|
||||||
|
endif
|
||||||
|
ifeq ($(mode),small)
|
||||||
|
cflags += -O1s -Zi -GL -DNDEBUG
|
||||||
|
lflags += -LTCG
|
||||||
|
endif
|
||||||
|
|
||||||
|
strip = :
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(mode),debug)
|
ifeq ($(mode),debug)
|
||||||
optimization-cflags = $(cflags_debug)
|
optimization-cflags = $(cflags_debug)
|
||||||
converter-cflags += $(cflags_debug)
|
converter-cflags += $(cflags_debug)
|
||||||
@ -842,51 +894,6 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef msvc
|
|
||||||
no-error =
|
|
||||||
windows-path = $(native-path)
|
|
||||||
windows-java-home := $(shell $(windows-path) "$(JAVA_HOME)")
|
|
||||||
zlib := $(shell $(windows-path) "$(win32)/msvc")
|
|
||||||
cxx = "$(msvc)/BIN/cl.exe"
|
|
||||||
cc = $(cxx)
|
|
||||||
ld = "$(msvc)/BIN/link.exe"
|
|
||||||
mt = "mt.exe"
|
|
||||||
manifest-flags = -MANIFEST -MANIFESTFILE:$(@).manifest
|
|
||||||
cflags = -nologo -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \
|
|
||||||
-DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \
|
|
||||||
-DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \
|
|
||||||
-Fd$(build)/$(name).pdb -I"$(zlib)/include" -I$(src) -I$(classpath-src) \
|
|
||||||
-I"$(build)" \
|
|
||||||
-I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \
|
|
||||||
-DTARGET_BYTES_PER_WORD=$(pointer-size)
|
|
||||||
|
|
||||||
ifneq ($(lzma),)
|
|
||||||
cflags += -I$(shell $(windows-path) "$(lzma)")
|
|
||||||
endif
|
|
||||||
|
|
||||||
shared = -dll
|
|
||||||
lflags = -nologo -LIBPATH:"$(zlib)/lib" -DEFAULTLIB:ws2_32 \
|
|
||||||
-DEFAULTLIB:zlib -DEFAULTLIB:user32 -MANIFEST -debug
|
|
||||||
output = -Fo$(1)
|
|
||||||
|
|
||||||
ifeq ($(mode),debug)
|
|
||||||
cflags += -Od -Zi -MDd
|
|
||||||
endif
|
|
||||||
ifeq ($(mode),debug-fast)
|
|
||||||
cflags += -Od -Zi -DNDEBUG
|
|
||||||
endif
|
|
||||||
ifeq ($(mode),fast)
|
|
||||||
cflags += -O2 -GL -Zi -DNDEBUG
|
|
||||||
lflags += -LTCG
|
|
||||||
endif
|
|
||||||
ifeq ($(mode),small)
|
|
||||||
cflags += -O1s -Zi -GL -DNDEBUG
|
|
||||||
lflags += -LTCG
|
|
||||||
endif
|
|
||||||
|
|
||||||
strip = :
|
|
||||||
endif
|
|
||||||
|
|
||||||
build-cflags += -DAVIAN_HOST_TARGET
|
build-cflags += -DAVIAN_HOST_TARGET
|
||||||
|
|
||||||
c-objects = $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%.o,$(x)))
|
c-objects = $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%.o,$(x)))
|
||||||
@ -938,7 +945,7 @@ 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
|
ifeq ($(aot-only),true)
|
||||||
cflags += -DAVIAN_AOT_ONLY
|
cflags += -DAVIAN_AOT_ONLY
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -1488,6 +1495,7 @@ $(bootimage-generator): $(bootimage-generator-objects)
|
|||||||
$(MAKE) mode=$(mode) \
|
$(MAKE) mode=$(mode) \
|
||||||
build=$(host-build-root) \
|
build=$(host-build-root) \
|
||||||
arch=$(build-arch) \
|
arch=$(build-arch) \
|
||||||
|
aot-only=false \
|
||||||
target-arch=$(arch) \
|
target-arch=$(arch) \
|
||||||
platform=$(bootimage-platform) \
|
platform=$(bootimage-platform) \
|
||||||
target-format=$(target-format) \
|
target-format=$(target-format) \
|
||||||
|
Loading…
Reference in New Issue
Block a user