harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib] incremental build is no more?
Date Sun, 26 Nov 2006 10:13:19 GMT
I've performed several experiments with the command line version of
ecj (org.eclipse.jdt.internal.compiler.batch.Main) and I found that it
takes system libs form somewhere even if such libs wasn't specified
with -cp / -classpath. I was surprised because AFAIK it shouldn't. But
nevertheless. If -bootclasspath is used instead of -classpath then
everything works good. So I can suggest the following fix:

in build-java.xml:
---
<target name="-compile" depends="-prepare-depends">
...
  <javac .....>
...
+
+  <bootclasspath path="${build.output}"/>
  </javac>

  <call-modules target="build" />
</target>
---

It works ok for incremental build as well as for full rebuild. Please
note that this doesn't mean that we are going to run ecj on top of
Harmony class libraries. I.e.

java -classpath .\depends\jars\ecj_3.2\ecj_3.2.jar
org.eclipse.jdt.internal.compiler.batch.Main -bootclasspath
.\build\classes
<blah> <blah>

differs from

javac -Xbootclasspath:.\build\classes -classpath
.\depends\jars\ecj_3.2\ecj_3.2.jar
org.eclipse.jdt.internal.compiler.batch.Main <blah> <blah>

RI goes mad in the last case.

Thanks,

2006/11/24, Tim Ellison <t.p.ellison@gmail.com>:
> Alexey Varlamov wrote:
> > I can't recall how many days I have to do full rebuild after updating
> > workspace in the morning, because just "ant" complained about java
> > compilation errors...
> > I did not give that much consideration until today, when trivial local
> > modification in luni class did not compile again. Could someone adept
> > in classlib build look into this, please?
>
> Well I can see the problem...
>
> Running with ant -v shows the javac command is being passed a classpath
> with the JARs of the running JRE too and they are ahead of the Harmony
> JARs.  So we are compiling against the code running Ant, and if that is
> not Harmony you are trying to compile against Sun/BEA/whatever.
>
> Just have to figure out why Ant is adding extra stuff to the classpath
> when we have explicitly defined it?
>
> Regards,
> Tim


-- 
Alexei Zakharov,
Intel Enterprise Solutions Software Division

Mime
View raw message