提交 1d24e071 编写于 作者: J jjg

6827026: Change javac source and target default to 7

Reviewed-by: darcy, ohair
上级 da3591c2
...@@ -115,6 +115,14 @@ else ...@@ -115,6 +115,14 @@ else
endif endif
endif endif
ifdef SOURCE_LANGUAGE_VERSION
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
else
ifdef JAVAC_SOURCE_ARG
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
endif
endif
ifdef ALT_BOOTDIR ifdef ALT_BOOTDIR
ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR) ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR)
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR) ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
# boot.java.home = /opt/jdk/1.5.0 # boot.java.home = /opt/jdk/1.5.0
boot.java = ${boot.java.home}/bin/java boot.java = ${boot.java.home}/bin/java
boot.javac = ${boot.java.home}/bin/javac boot.javac = ${boot.java.home}/bin/javac
boot.javac.target = 5 boot.javac.source = 6
boot.javac.target = 6
# This is the JDK used to run the product version of the tools, # This is the JDK used to run the product version of the tools,
# for example, for testing. If you're building a complete JDK, specify that. # for example, for testing. If you're building a complete JDK, specify that.
...@@ -59,7 +60,8 @@ full.version = ${release}-${build.number} ...@@ -59,7 +60,8 @@ full.version = ${release}-${build.number}
bootstrap.full.version = ${bootstrap.release}-${build.number} bootstrap.full.version = ${bootstrap.release}-${build.number}
# options for the <javac> tasks used to compile the tools # options for the <javac> tasks used to compile the tools
javac.target = 6 javac.source = 5
javac.target = 5
javac.debug = true javac.debug = true
javac.debuglevel = source,lines javac.debuglevel = source,lines
javac.no.jdk.warnings = -XDignore.symbol.file=true javac.no.jdk.warnings = -XDignore.symbol.file=true
......
...@@ -393,6 +393,7 @@ ...@@ -393,6 +393,7 @@
<attribute name="java" default="java"/> <attribute name="java" default="java"/>
<attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
<attribute name="javac.java.home" default="${boot.java.home}"/> <attribute name="javac.java.home" default="${boot.java.home}"/>
<attribute name="javac.source" default="${javac.source}"/>
<attribute name="javac.target" default="${javac.target}"/> <attribute name="javac.target" default="${javac.target}"/>
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
<attribute name="jarclasspath" default=""/> <attribute name="jarclasspath" default=""/>
...@@ -411,6 +412,7 @@ ...@@ -411,6 +412,7 @@
release="@{release}" release="@{release}"
full.version="@{full.version}" full.version="@{full.version}"
javac.bootclasspath="@{javac.bootclasspath}" javac.bootclasspath="@{javac.bootclasspath}"
javac.source="@{javac.source}"
javac.target="@{javac.target}" javac.target="@{javac.target}"
/> />
<mkdir dir="@{bin.dir}"/> <mkdir dir="@{bin.dir}"/>
...@@ -435,6 +437,7 @@ ...@@ -435,6 +437,7 @@
<attribute name="lib.dir" default="${dist.lib.dir}"/> <attribute name="lib.dir" default="${dist.lib.dir}"/>
<attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
<attribute name="javac.java.home" default="${boot.java.home}"/> <attribute name="javac.java.home" default="${boot.java.home}"/>
<attribute name="javac.source" default="${javac.source}"/>
<attribute name="javac.target" default="${javac.target}"/> <attribute name="javac.target" default="${javac.target}"/>
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
<attribute name="jarclasspath" default=""/> <attribute name="jarclasspath" default=""/>
...@@ -450,6 +453,7 @@ ...@@ -450,6 +453,7 @@
release="@{release}" release="@{release}"
full.version="@{full.version}" full.version="@{full.version}"
javac.bootclasspath="@{javac.bootclasspath}" javac.bootclasspath="@{javac.bootclasspath}"
javac.source="@{javac.source}"
javac.target="@{javac.target}" javac.target="@{javac.target}"
/> />
<mkdir dir="@{lib.dir}"/> <mkdir dir="@{lib.dir}"/>
...@@ -474,6 +478,7 @@ ...@@ -474,6 +478,7 @@
<attribute name="gensrc.dir" default="${build.gensrc.dir}"/> <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
<attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/> <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
<attribute name="javac.java.home" default="${boot.java.home}"/> <attribute name="javac.java.home" default="${boot.java.home}"/>
<attribute name="javac.source" default="${javac.source}"/>
<attribute name="javac.target" default="${javac.target}"/> <attribute name="javac.target" default="${javac.target}"/>
<attribute name="release" default="${release}"/> <attribute name="release" default="${release}"/>
<attribute name="full.version" default="${full.version}"/> <attribute name="full.version" default="${full.version}"/>
...@@ -502,6 +507,7 @@ ...@@ -502,6 +507,7 @@
includes="@{includes}" includes="@{includes}"
sourcepath="" sourcepath=""
includeAntRuntime="no" includeAntRuntime="no"
source="@{javac.source}"
target="@{javac.target}"> target="@{javac.target}">
<compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/> <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
<compilerarg line="${javac.version.opt}"/> <compilerarg line="${javac.version.opt}"/>
...@@ -515,6 +521,7 @@ ...@@ -515,6 +521,7 @@
excludes="@{excludes}" excludes="@{excludes}"
sourcepath="" sourcepath=""
includeAntRuntime="no" includeAntRuntime="no"
source="@{javac.source}"
target="@{javac.target}" target="@{javac.target}"
debug="${javac.debug}" debug="${javac.debug}"
debuglevel="${javac.debuglevel}"> debuglevel="${javac.debuglevel}">
...@@ -540,6 +547,7 @@ ...@@ -540,6 +547,7 @@
<target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool"> <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
<presetdef name="build-bootstrap-tool"> <presetdef name="build-bootstrap-tool">
<build-tool <build-tool
javac.source="${boot.javac.source}"
javac.target="${boot.javac.target}" javac.target="${boot.javac.target}"
gensrc.dir="${build.bootstrap.dir}/gensrc" gensrc.dir="${build.bootstrap.dir}/gensrc"
classes.dir="${build.bootstrap.dir}/classes" classes.dir="${build.bootstrap.dir}/classes"
...@@ -555,6 +563,7 @@ ...@@ -555,6 +563,7 @@
<target name="-def-build-bootstrap-jar" depends="-def-build-jar"> <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
<presetdef name="build-bootstrap-jar"> <presetdef name="build-bootstrap-jar">
<build-jar <build-jar
javac.source="${boot.javac.source}"
javac.target="${boot.javac.target}" javac.target="${boot.javac.target}"
gensrc.dir="${build.bootstrap.dir}/gensrc" gensrc.dir="${build.bootstrap.dir}/gensrc"
classes.dir="${build.bootstrap.dir}/classes" classes.dir="${build.bootstrap.dir}/classes"
......
...@@ -95,7 +95,7 @@ public enum Source { ...@@ -95,7 +95,7 @@ public enum Source {
this.name = name; this.name = name;
} }
public static final Source DEFAULT = JDK1_5; public static final Source DEFAULT = JDK1_7;
public static Source lookup(String name) { public static Source lookup(String name) {
return tab.get(name); return tab.get(name);
......
...@@ -108,7 +108,7 @@ public enum Target { ...@@ -108,7 +108,7 @@ public enum Target {
this.minorVersion = minorVersion; this.minorVersion = minorVersion;
} }
public static final Target DEFAULT = JDK1_6; public static final Target DEFAULT = JDK1_7;
public static Target lookup(String name) { public static Target lookup(String name) {
return tab.get(name); return tab.get(name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册