help for optimize cpptasks

gil puntogil at libero.it
Tue Jul 21 16:03:05 UTC 2015


hi
i try to import lz4-java
It use bundle code of lz4 (and some part of xxhash ...)
but i need an help for optimized the compile-jni task
at the moment i done these changes

   <target name="compile-jni" 
depends="install-cpptasks,generate-headers" unless="${skip.jni}">
     <mkdir dir="${build}/objects" />
     <mkdir dir="${build}/jni/${platform}/${os.arch}" />
     <cpptasks:cc
       debug="false"
       optimize="extreme"
       objdir="${build}/objects"
       outfile="${build}/jni/${platform}/${os.arch}/lz4-java"
       outtype="shared">
       <includepath path="${src}/xxhash" />
-      <includepath path="${src}/lz4" />
+      <includepath path="/usr/include" />
       <includepath path="${java.home}/../include" />
       <includepath path="${java.home}/../include/${platform}/" />
       <includepath path="${build}/jni-headers" />
-      <fileset dir="${src}/lz4" includes="lz4.c, lz4hc.c" />
+      <!--fileset dir="${src}/lz4" includes="lz4.c, lz4hc.c" /-->
       <fileset dir="${src}/xxhash" includes="xxhash.c" />
       <fileset dir="${src}/jni" includes="*.c" />
-      <linker />
+      <compilerarg value="-llz4"/>
+      <compilerarg value="-Wall"/>
+      <compilerarg value="-O2"/>
+      <linkerarg value="-O2"/>
+      <linkerarg value="-L${libdir}" />
+      <linkerarg value="-L${build}/objects" />
+      <linkerarg value="-llz4" location="end"/>
     </cpptasks:cc>
   </target>

my work is available here:
https://gil.fedorapeople.org/lz4-java-1.3.0-1.fc22.src.rpm
https://gil.fedorapeople.org/lz4-java.spec

thanks in advance
gil
Konsole outpu


More information about the devel mailing list