OT: support for multicore javac?

Greg Lewis glewis at eyesbeyond.com
Mon Jul 20 14:07:53 UTC 2020


On 2020-07-18 22:51, Aryeh Friedman wrote:
>
>
> On Sun, Jul 19, 2020 at 1:28 AM Greg Lewis <glewis at eyesbeyond.com
> <mailto:glewis at eyesbeyond.com>> wrote:
>
>     On Sat, Jul 18, 2020 at 12:50:36PM +1200, Jonathan Chen wrote:
>     > On Sat, 18 Jul 2020 at 12:31, Aryeh Friedman
>     <aryeh.friedman at gmail.com <mailto:aryeh.friedman at gmail.com>> wrote:
>     > >> I'm building eclipse, and invocations to javac seem to spread
>     across
>     > >> multiple cores when building with multiple threads using
>     openjdk11; at
>     > >> least that's what "top -H" tells me. I don't see what smart-javac
>     > >> brings to the table.
>     > >
>     > > I don't use eclipse or any IDE and many people other users
>     don't also.   All this is done by eclipse not the command line
>     tools and people who work with them need good support for them
>     (see the README in sjavac...  https://github.com/weetmuts/sjavac
>     ... as to the reasons for not using an IDE see
>     https://docs.freebsd.org/cgi/getmsg.cgi?fetch=31816+0+current/freebsd-questions
>     > >
>     >
>     > My statement should be re-phrased as: When I'm building the eclipse
>     > port from the command line, with maven, each javac invocation
>     spreads
>     > the work over multiple cores. You can easily view this with "top
>     -H".
>
>     FWIW, sjavac has been used by default since JDK 9, so yes, you'd
>     expect to
>     see multiple cores being used with openjdk11.  The sjavac Github
>     reference
>     above is a backport to openjdk8.
>
>
> Does that mind if I use 9+ I can give the -j option and it will work
> as the sjavac docs say it will?.... the main reason why I decided no
> to use the github version even though I use openjdk 8 by default is it
> had no way to pass options down to the wrapped javac such as (which is
> the default I use in almost all my projects with the most important
> one being -Werror):
>
> -Xprefer:source -implicit:none -Xlint -Xdiags:verbose -Werror 
>
> -- 
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org


IIRC you don't have to pass any options.  It's just the default with
newer versions of OpenJDK.


-- Greg



More information about the freebsd-java mailing list