building LLVM with just the C backend

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

building LLVM with just the C backend

Jay Foad
I tried building LLVM 2.1 with no real target CPU backends enabled, just the
C backend, by hacking the configure script slightly:


--- /home/foad/llvm/llvm-2.1/configure  2007-09-17 22:37:52.000000000 +0100
+++ configure   2007-12-13 10:29:41.000000000 +0000
@@ -4762,7 +4762,7 @@
   done
   ;;
 esac
-TARGETS_TO_BUILD="CBackend MSIL $TARGETS_TO_BUILD"
+TARGETS_TO_BUILD="CBackend"
 TARGETS_TO_BUILD=$TARGETS_TO_BUILD


It didn't work. I get these link failures:


make[2]: Entering directory
`/home/foad/svn/antix/toolchain/trunk/toolchain/obj/llvm-obj/tools/llc'
llvm[2]: Linking Debug executable llc
/home/foad/svn/antix/toolchain/trunk/toolchain/obj/llvm-obj/tools/llc/Debug/
llc.o: In function `ForceCodegenLinking':
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:38: undefined reference to
`llvm::createBFS_DAGScheduler(llvm::SelectionDAGISel*, llvm::SelectionDAG*,
llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:39: undefined reference to
`llvm::createSimpleDAGScheduler(llvm::SelectionDAGISel*,
llvm::SelectionDAG*, llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:40: undefined reference to
`llvm::createNoItinsDAGScheduler(llvm::SelectionDAGISel*,
llvm::SelectionDAG*, llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:41: undefined reference to
`llvm::createBURRListDAGScheduler(llvm::SelectionDAGISel*,
llvm::SelectionDAG*, llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:42: undefined reference to
`llvm::createTDRRListDAGScheduler(llvm::SelectionDAGISel*,
llvm::SelectionDAG*, llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:43: undefined reference to
`llvm::createTDListDAGScheduler(llvm::SelectionDAGISel*,
llvm::SelectionDAG*, llvm::MachineBasicBlock*)'
/home/foad/svn/antix/toolchain/trunk/toolchain/llvm/llvm/include/llvm/CodeGe
n/LinkAllCodegenComponents.h:44: undefined reference to
`llvm::createDefaultScheduler(llvm::SelectionDAGISel*, llvm::SelectionDAG*,
llvm::MachineBasicBlock*)'
collect2: ld returned 1 exit status
make[2]: ***
[/home/foad/svn/antix/toolchain/trunk/toolchain/obj/llvm-obj/Debug/bin/llc]
Error 1


Is this something that ought to work? Any idea how to go about fixing it?

Thanks,
Jay.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: building LLVM with just the C backend

Chris Lattner

On Dec 13, 2007, at 2:37 AM, Jay Foad wrote:

> I tried building LLVM 2.1 with no real target CPU backends enabled,  
> just the
> C backend, by hacking the configure script slightly:
>
>
> --- /home/foad/llvm/llvm-2.1/configure  2007-09-17  
> 22:37:52.000000000 +0100
> +++ configure   2007-12-13 10:29:41.000000000 +0000
> @@ -4762,7 +4762,7 @@
>   done
>   ;;
> esac
> -TARGETS_TO_BUILD="CBackend MSIL $TARGETS_TO_BUILD"
> +TARGETS_TO_BUILD="CBackend"
> TARGETS_TO_BUILD=$TARGETS_TO_BUILD
>
>
> It didn't work. I get these link failures:
> Is this something that ought to work? Any idea how to go about  
> fixing it?

I don't really know, however, things are slightly different on  
mainline now.  Now if you use --enable-targets=cbe you should just get  
the C backend without anything else, including the MSIL target.

I haven't tried it, but it should work :)

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev