mirror of
https://github.com/corda/corda.git
synced 2025-01-17 10:20:02 +00:00
support cross-platform bootimage build (as long as the build arch matches the target arch
This commit is contained in:
parent
aa7b47eec4
commit
c479bccdb4
18
makefile
18
makefile
@ -230,12 +230,17 @@ endif
|
|||||||
bootimage-generator-sources = $(src)/bootimage.cpp
|
bootimage-generator-sources = $(src)/bootimage.cpp
|
||||||
bootimage-generator-objects = \
|
bootimage-generator-objects = \
|
||||||
$(call cpp-objects,$(bootimage-generator-sources),$(src),$(native-build))
|
$(call cpp-objects,$(bootimage-generator-sources),$(src),$(native-build))
|
||||||
bootimage-generator = $(native-build)/bootimage-generator
|
bootimage-generator = \
|
||||||
|
$(build)/$(build-platform)-$(build-arch)-compile-fast/bootimage-generator
|
||||||
|
|
||||||
bootimage-bin = $(native-build)/bootimage.bin
|
bootimage-bin = $(native-build)/bootimage.bin
|
||||||
bootimage-object = $(native-build)/bootimage-bin.o
|
bootimage-object = $(native-build)/bootimage-bin.o
|
||||||
|
|
||||||
ifeq ($(bootimage),true)
|
ifeq ($(bootimage),true)
|
||||||
|
ifneq ($(build-arch),$(arch))
|
||||||
|
error "can't cross-build a bootimage"
|
||||||
|
endif
|
||||||
|
|
||||||
vm-classpath-object = $(bootimage-object)
|
vm-classpath-object = $(bootimage-object)
|
||||||
cflags += -DBOOT_IMAGE=\"bootimageBin\"
|
cflags += -DBOOT_IMAGE=\"bootimageBin\"
|
||||||
else
|
else
|
||||||
@ -450,7 +455,16 @@ else
|
|||||||
endif
|
endif
|
||||||
$(strip) $(strip-all) $(@)
|
$(strip) $(strip-all) $(@)
|
||||||
|
|
||||||
$(bootimage-generator): \
|
$(bootimage-generator):
|
||||||
|
(unset MAKEFLAGS && \
|
||||||
|
make mode=fast process=compile \
|
||||||
|
arch=$(build-arch) \
|
||||||
|
platform=$(build-platform) \
|
||||||
|
bootimage-generator= \
|
||||||
|
build-bootimage-generator=$(bootimage-generator) \
|
||||||
|
$(bootimage-generator))
|
||||||
|
|
||||||
|
$(build-bootimage-generator): \
|
||||||
$(vm-objects) $(classpath-object) $(jni-objects) $(heapwalk-objects) \
|
$(vm-objects) $(classpath-object) $(jni-objects) $(heapwalk-objects) \
|
||||||
$(bootimage-generator-objects)
|
$(bootimage-generator-objects)
|
||||||
@echo "linking $(@)"
|
@echo "linking $(@)"
|
||||||
|
Loading…
Reference in New Issue
Block a user