# HG changeset patch # User Chris Seaton # Date 1386942853 0 # Node ID 30e57b49fdb13cae4e6ba1fb4d4068347d53e55c # Parent d3b3c6e17d407d49afe4559c8fb97fd5b0c2d83c Include annotation processor meta-info in Truffle JAR. diff -r d3b3c6e17d40 -r 30e57b49fdb1 mx/mx_graal.py --- a/mx/mx_graal.py Fri Dec 13 10:44:09 2013 +0100 +++ b/mx/mx_graal.py Fri Dec 13 13:54:13 2013 +0000 @@ -1350,7 +1350,7 @@ """make truffle.jar""" # We use the DSL processor as the starting point for the classpath - this # therefore includes the DSL processor, the DSL and the API. - packagejar(mx.classpath("com.oracle.truffle.dsl.processor").split(os.pathsep), "truffle.jar", None) + packagejar(mx.classpath("com.oracle.truffle.dsl.processor").split(os.pathsep), "truffle.jar", None, "com.oracle.truffle.dsl.processor.TruffleProcessor") def isGraalEnabled(vm): return vm != 'original' and not vm.endswith('nograal') @@ -1444,7 +1444,7 @@ mx.distribution('GRAAL').add_update_listener(_installGraalJarInJdks) -def packagejar(classpath, outputFile, mainClass): +def packagejar(classpath, outputFile, mainClass, annotationProcessor=None): prefix = '' if mx.get_os() != 'windows' else '\\??\\' # long file name hack print "creating", outputFile filecount, totalsize = 0, 0 @@ -1453,6 +1453,8 @@ if mainClass != None: manifest += "Main-Class: %s\n\n" % (mainClass) zf.writestr("META-INF/MANIFEST.MF", manifest) + if annotationProcessor != None: + zf.writestr("META-INF/services/javax.annotation.processing.Processor", annotationProcessor) for cp in classpath: print "+", cp if cp.endswith(".jar"):