mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
allow building with Java 7
This commit is contained in:
parent
66712a8cff
commit
549810deba
@ -1,9 +1,6 @@
|
||||
language: cpp
|
||||
cache: apt
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
16
makefile
16
makefile
@ -3,6 +3,10 @@ MAKEFLAGS = -s
|
||||
name = avian
|
||||
version := $(shell grep version gradle.properties | cut -d'=' -f2)
|
||||
|
||||
java-version := $(shell $(JAVA_HOME)/bin/java -version 2>&1 \
|
||||
| head -n 1 \
|
||||
| sed 's/.*version "1.\([^.]*\).*/\1/')
|
||||
|
||||
build-arch := $(shell uname -m \
|
||||
| sed 's/^i.86$$/i386/' \
|
||||
| sed 's/^x86pc$$/i386/' \
|
||||
@ -1478,6 +1482,7 @@ ifneq ($(classpath),avian)
|
||||
$(classpath-src)/java/lang/invoke/MethodHandles.java \
|
||||
$(classpath-src)/java/lang/invoke/MethodType.java \
|
||||
$(classpath-src)/java/lang/invoke/LambdaMetafactory.java \
|
||||
$(classpath-src)/java/lang/invoke/LambdaConversionException.java \
|
||||
$(classpath-src)/java/lang/invoke/CallSite.java
|
||||
|
||||
ifeq ($(openjdk),)
|
||||
@ -1514,7 +1519,10 @@ vm-classes = \
|
||||
avian/resource/*.class
|
||||
|
||||
test-support-sources = $(shell find $(test)/avian/ -name '*.java')
|
||||
test-sources = $(wildcard $(test)/*.java)
|
||||
test-sources := $(wildcard $(test)/*.java)
|
||||
ifeq (7,$(java-version))
|
||||
test-sources := $(subst $(test)/InvokeDynamic.java,,$(test-sources))
|
||||
endif
|
||||
test-cpp-sources = $(wildcard $(test)/*.cpp)
|
||||
test-sources += $(test-support-sources)
|
||||
test-support-classes = $(call java-classes, $(test-support-sources),$(test),$(test-build))
|
||||
@ -1694,7 +1702,7 @@ $(classpath-dep): $(classpath-sources) $(classpath-jar-dep)
|
||||
classes="$(shell $(MAKE) -s --no-print-directory build=$(build) \
|
||||
$(classpath-classes) arch=$(build-arch) platform=$(bootimage-platform))"; \
|
||||
if [ -n "$${classes}" ]; then \
|
||||
$(javac) -source 1.8 -target 1.8 \
|
||||
$(javac) -source 1.$(java-version) -target 1.$(java-version) \
|
||||
-d $(classpath-build) -bootclasspath $(boot-classpath) \
|
||||
$${classes}; fi
|
||||
@touch $(@)
|
||||
@ -1770,7 +1778,7 @@ $(test-dep): $(test-sources) $(test-library)
|
||||
@mkdir -p $(test-build)
|
||||
files="$(shell $(MAKE) -s --no-print-directory build=$(build) $(test-classes))"; \
|
||||
if test -n "$${files}"; then \
|
||||
$(javac) -source 1.8 -target 1.8 \
|
||||
$(javac) -source 1.$(java-version) -target 1.$(java-version) \
|
||||
-classpath $(test-build) -d $(test-build) -bootclasspath $(boot-classpath) $${files}; \
|
||||
fi
|
||||
$(javac) -source 1.2 -target 1.1 -XDjsrlimit=0 -d $(test-build) \
|
||||
@ -1782,7 +1790,7 @@ $(test-extra-dep): $(test-extra-sources)
|
||||
@mkdir -p $(test-build)
|
||||
files="$(shell $(MAKE) -s --no-print-directory build=$(build) $(test-extra-classes))"; \
|
||||
if test -n "$${files}"; then \
|
||||
$(javac) -source 1.8 -target 1.8 \
|
||||
$(javac) -source 1.$(java-version) -target 1.$(java-version) \
|
||||
-d $(test-build) -bootclasspath $(boot-classpath) $${files}; \
|
||||
fi
|
||||
@touch $(@)
|
||||
|
Loading…
Reference in New Issue
Block a user