diff options
author | Xavier Ducrohet <xav@android.com> | 2012-02-23 10:51:29 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-02-23 11:26:00 -0800 |
commit | baeef7fd3828cd609d7f6f8065466b706928dacb (patch) | |
tree | 1af2d920e7200545a82d9aa9ef340ea6f7dacca1 /files/ant | |
parent | f20c7c7e502fcd4df97e6ba2597ccfe3c5962873 (diff) | |
download | sdk-baeef7fd3828cd609d7f6f8065466b706928dacb.zip sdk-baeef7fd3828cd609d7f6f8065466b706928dacb.tar.gz sdk-baeef7fd3828cd609d7f6f8065466b706928dacb.tar.bz2 |
Fork javac on windows to prevent file locking.
On Windows, when using java 1.5/1.6 running javac without
fork=true can result in file locking preventing further changes
to them.
This changes sets fork=true in this case (win, java 1.5/1.6).
More info: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6558476
Bug: 24577
Change-Id: I6477ab0615c5a535b2011f2e9f40bc8f818f67a2
Diffstat (limited to 'files/ant')
-rw-r--r-- | files/ant/build.xml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/files/ant/build.xml b/files/ant/build.xml index e47c3fe..05dfdec 100644 --- a/files/ant/build.xml +++ b/files/ant/build.xml @@ -188,6 +188,17 @@ <!-- properties for packaging --> <property name="build.packaging.nocrunch" value="true" /> + <!-- whether we need to fork javac. + This is only needed on Windows when running Java < 7 --> + <condition else="false" property="need.javac.fork"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <!-- ******************************************************* --> <!-- ************************ Macros *********************** --> <!-- ******************************************************* --> @@ -657,7 +668,8 @@ bootclasspathref="android.target.classpath" verbose="${verbose}" classpath="${extensible.classpath}" - classpathref="jar.libs.ref"> + classpathref="jar.libs.ref" + fork="${need.javac.fork}"> <src path="${source.absolute.dir}" /> <src path="${gen.absolute.dir}" /> <classpath> |