llvmpipe: Centralize LLVM initialization.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Mar 2010 12:00:25 +0000 (12:00 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Mar 2010 12:02:26 +0000 (12:02 +0000)
src/gallium/drivers/llvmpipe/lp_jit.c
src/gallium/drivers/llvmpipe/lp_test_main.c

index d3d7e26882d1146395e11336a5a3e6d38abeef4c..b666ffc80433668f919225bd55eebacb5d58b51d 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "util/u_memory.h"
 #include "util/u_cpu_detect.h"
+#include "gallivm/lp_bld_init.h"
 #include "lp_debug.h"
 #include "lp_screen.h"
 #include "gallivm/lp_bld_intr.h"
@@ -148,8 +149,7 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
    util_cpu_caps.has_sse4_1 = 0;
 #endif
 
-   LLVMLinkInJIT();
-   LLVMInitializeNativeTarget();
+   lp_build_init();
 
    screen->module = LLVMModuleCreateWithName("llvmpipe");
 
index b08872b2b502102f44e4ba89fdc88fff5f235d6e..f9dce8b9c254b953d62c37a25e089b416bf5d473 100644 (file)
@@ -380,8 +380,7 @@ int main(int argc, char **argv)
          n = atoi(argv[i]);
    }
 
-   LLVMLinkInJIT();
-   LLVMInitializeNativeTarget();
+   lp_build_init();
 
    util_cpu_detect();