Adding javac flag -XDallowInterceptTypes for javadoc
Henry Jen
henry.jen at oracle.com
Thu Dec 6 10:23:37 PST 2012
On Dec 6, 2012, at 1:48 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
> I'm not sure what you are trying to do and have no idea what -XDallowIntersectionTypes means, but changing any makefiles in jdk/make will not affect the new build.
This is to temporarily enable a currently-disabled(but will be enabled in JDK8) compiler feature.
> The new build makefiles is found in jdk/makefiles. Most of the java classes are built in one single javac invocation, so adding the flag to only specific files is tricky.
>
Hmm, perhaps I missed some step. I believe I did 'rm -fr build' for each attempt to make build. Perhaps I forgot to clean up some environment variable.
Anyway, I am looking for a way to add that flag for now so we don't have to be blocked on integrating the feature. Ideally in a limited scope just to minimize the impact. If not possible, what's the suggested way to change it?
BTW, I tried OTHER_JAVACFLAGS with configure, same error for javadoc. So I assume there is a separate flag to be set for javadoc's purpose?
Cheers,
Henry
> /Erik
>
> On 2012-12-06 06:26, Henry Jen wrote:
>> Hi,
>>
>> I am trying to build TL repo which support intercept type cast, in order
>> to make the build, I added
>>
>> OTHER_JAVACFLAGS += -XDallowIntersectionTypes
>>
>> to make/java/jave/Makefiles, which works for new build, but failed for
>> old build in javadoc step.
>>
>> Would you please advise what would be the right approach to fix this for
>> javadoc?
>>
>> Cheers,
>> Henry
>>
>>
>> /java/re/jdk/1.7.0/archive/fcs/binaries/linux-amd64/bin/java
>> -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
>> -Xmx1024m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m
>> "-Xbootclasspath/p:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javadoc.jar:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/doclets.jar"
>> -jar
>> /home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javadoc.jar
>> -bootclasspath "/home/hjen/ws/tl/build/linux-amd64/classes" -d
>> /home/hjen/ws/tl/build/linux-amd64/docs/api \
>> @/home/hjen/ws/tl/build/linux-amd64/tmp/docs/doctmp/coredocs.options
>> @/home/hjen/ws/tl/build/linux-amd64/tmp/docs/doctmp/coredocs.packages
>> ../../src/share/classes/java/util/Comparators.java:114: error:
>> intersection types in cast are not supported in -source 1.8
>> return (Comparator<Map.Entry<K, V>> & Serializable)
>> ^
>> (use -source 8 or higher to enable default methods)
>> 1 error
More information about the build-infra-dev
mailing list