Building with a new javac flag
Erik Joelsson
erik.joelsson at oracle.com
Tue Nov 13 00:12:36 PST 2012
In this case I would go with configure. This is because the value of the
option has different defaults depending on jdk variant/profile. If it
was a less often used parameter, something more general like
"--with-add-javacflags=" could be used, but that only fits options that
are always default off.
On a sidenote, it's still possible to override configure options with
variables in the environment or on the command line if you know the name
of the make variable being set. I just wouldn't normally recommend it.
/Erik
On 2012-11-13 01:13, David Holmes wrote:
> On 13/11/2012 7:51 AM, Alex Buckley wrote:
>> Dear build experts,
>>
>> In JDK8, javac will be able to store the names/modifiers of method
>> parameters in the class file. The names are stored only if a flag -
>> let's say "-parameters" - is passed to javac.
>>
>> (I know this feels like storing debug info with -g. Please set that
>> concern aside.)
>>
>> What would it take to compile JDK8 _without_ this flag when building
>> Java SE Embedded, and _with_ this flag otherwise?
>>
>> (I know this will raise immediate questions about the size of
>> non-Embedded rt.jar. Please set that concern aside.)
>>
>> David Holmes has suggested that javac flags are or could be expressed as
>> a ./configure option, so that Embedded and non-Embedded build scripts
>> can turn the -parameters flag on or off.
>
> But I also questioned whether it should be a configure option as you
> can't make every possible tool flag be a configure option.
>
> The basic requirement is that the -parameters setting must be
> customizable, so we need to decide the best way to achieve that.
>
> David
>
>> Alex
More information about the build-infra-dev
mailing list