[llvm-commits] CVS: llvm-java/runtime/runtime.c Makefile

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed Nov 24 11:45:03 PST 2004



Changes in directory llvm-java/runtime:

runtime.c updated: 1.10 -> 1.11
Makefile updated: 1.4 -> 1.5
---
Log message:

Make jni libraries link properly with java code. This allows us to run
the tests in Programs/SingleSource/UnitTests.


---
Diffs of the changes:  (+6 -11)

Index: llvm-java/runtime/runtime.c
diff -u llvm-java/runtime/runtime.c:1.10 llvm-java/runtime/runtime.c:1.11
--- llvm-java/runtime/runtime.c:1.10	Wed Nov 24 02:59:19 2004
+++ llvm-java/runtime/runtime.c	Wed Nov 24 13:44:53 2004
@@ -1,17 +1,11 @@
 #include <stdlib.h>
+#include <llvm/Java/jni.h>
 
 struct llvm_java_object_base;
 struct llvm_java_object_header;
 struct llvm_java_object_vtable;
 struct llvm_java_object_typeinfo;
 
-/* Define VM internal types */
-typedef struct llvm_java_object_base* jobject;
-typedef unsigned jfieldID;
-typedef unsigned jmethodID;
-#define _JNI_VM_INTERNAL_TYPES_DEFINED
-#include <jni.h>
-
 struct llvm_java_object_header {
   /* gc info, hash info, locking */
 };
@@ -77,7 +71,7 @@
 
 
 /* The JNI interface definition */
-const struct JNINativeInterface llvm_java_JNIEnv = {
+static const struct JNINativeInterface llvm_java_JNINativeInterface = {
   NULL,
   NULL,
   NULL,
@@ -312,6 +306,8 @@
   NULL,
 };
 
+const JNIEnv llvm_java_JNIEnv = &llvm_java_JNINativeInterface;
+
 extern void llvm_java_static_init(void);
 extern void llvm_java_main(int, char**);
 


Index: llvm-java/runtime/Makefile
diff -u llvm-java/runtime/Makefile:1.4 llvm-java/runtime/Makefile:1.5
--- llvm-java/runtime/Makefile:1.4	Wed Nov 24 02:59:19 2004
+++ llvm-java/runtime/Makefile	Wed Nov 24 13:44:53 2004
@@ -7,9 +7,8 @@
 #
 ##===----------------------------------------------------------------------===##
 LEVEL := ..
-# FIXME: This needs to be handled by the configure script or alternatively
-# import jni.h in the java-fe.
-CPPFLAGS+=-I$(HOME)/projects/college/classpath-0.12/include
+
+CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java
 BYTECODE_LIBRARY=1
 LIBRARYNAME=jrt
 






More information about the llvm-commits mailing list