llvmpipe: Allow building with LLVM 2.6 too.

This commit is contained in:
José Fonseca 2009-09-26 09:33:32 +01:00
parent 28f531e3fe
commit 1df539ce87
3 changed files with 15 additions and 0 deletions

View File

@ -147,6 +147,11 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
{
char *error = NULL;
#ifdef LLVM_NATIVE_ARCH
LLVMLinkInJIT();
LLVMInitializeNativeTarget();
#endif
screen->module = LLVMModuleCreateWithName("llvmpipe");
screen->provider = LLVMCreateModuleProviderForExistingModule(screen->module);

View File

@ -264,6 +264,11 @@ int main(int argc, char **argv)
unsigned i;
int ret;
#ifdef LLVM_NATIVE_ARCH
LLVMLinkInJIT();
LLVMInitializeNativeTarget();
#endif
for (i = 0; i < sizeof(test_cases)/sizeof(test_cases[0]); ++i)
if(!test_format(&test_cases[i]))
ret = 1;

View File

@ -365,6 +365,11 @@ int main(int argc, char **argv)
n = atoi(argv[i]);
}
#ifdef LLVM_NATIVE_ARCH
LLVMLinkInJIT();
LLVMInitializeNativeTarget();
#endif
if(fp) {
/* Warm up the caches */
test_some(0, NULL, 100);