Author Topic: Clang integration?  (Read 35798 times)

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #15 on: November 12, 2010, 04:24:04 am »
hmm havent changed anything on my ftp ? try pasting the url directly.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clang integration?
« Reply #16 on: November 12, 2010, 04:46:48 am »
hmm havent changed anything on my ftp ? try pasting the url directly.
the url becomes like this in my firefox address bar:
Code
ftp://90.184.233.166/LLVM.7z/
this is a folder...
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #17 on: November 12, 2010, 08:02:51 am »
should be ftp://90.184.233.166:21/LLVM.7z

not sure why it changed though.

uploading a shared build with thread and exception support in a short.

new build uses pthreads for threading.

ill probably apply johns patchset to the llvm-gcc backend to get the exception handling working on static builds.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clang integration?
« Reply #18 on: November 12, 2010, 09:29:25 am »
I still show a folder. see the screen shot. :(
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #19 on: November 12, 2010, 10:29:06 am »
no idea why that happens tbh. i just had one of my mates try and download it and he had no problem so im a bit lost.

which browser do you use ? personally i use firefox and it works here.

btw shared build is done ftp://90.184.233.166:21/LLVM-shared.7z latest svn version.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #20 on: November 12, 2010, 10:31:14 am »
uploading the package to my google code site should be downloadable from there.

edit: is up now.
« Last Edit: November 12, 2010, 10:35:49 am by reckless »

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #21 on: November 13, 2010, 06:18:33 am »
preliminary testing suggests that it might work with codeblocks allthough the linking stage fails. as far as i could read into it its because the parsing is done differently (linker cant determine the type of the object files).

it works fine with msys so far.

feel free to use my provided package if you intend on adding support for llvm in codeblocks.

meanwhile ill look at what changes will be nessesary to get dragonegg working with win32 mingw.
« Last Edit: November 13, 2010, 06:21:05 am by reckless »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clang integration?
« Reply #22 on: December 09, 2010, 06:42:29 am »
@reckless
I just use this package
ftp://90.184.233.166/LLVM-shared.7z

and configure in codeblocks like below:


then, I just using the wizard to create a console hello world project.

but it failed on compiling...
Code

-------------- Build: Debug in buildllvmgcctest ---------------

[ 50.0%] llvm-g++.exe -Wall -fexceptions  -g     -c F:\cb\testCode\buildllvmgcctest\main.cpp -o obj\Debug\main.o
[100.0%] llvm-g++.exe  -o bin\Debug\buildllvmgcctest.exe obj\Debug\main.o   
F:\cb\testCode\buildllvmgcctest\main.cpp:1:20: error: iostream: No such file or directory
F:\cb\testCode\buildllvmgcctest\main.cpp: In function 'int main()':
F:\cb\testCode\buildllvmgcctest\main.cpp:7: error: 'cout' was not declared in this scope
F:\cb\testCode\buildllvmgcctest\main.cpp:7: error: 'endl' was not declared in this scope
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)

Do I need to manually add the include search patch??

thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clang integration?
« Reply #23 on: December 09, 2010, 06:49:39 am »
by the way, you just hard-coded the path??

see the log below when I run the command:
Quote
F:\cb\llvm_gcc\LLVM\bin>llvm-gcc -v -x c++ nul -fsyntax-only
Using built-in specs.
Target: i386-mingw32
Configured with: ../llvm-gcc-4.2/configure --prefix=/llvm --host=i386-mingw32 --
build=i386-mingw32 --enable-languages=c,c++,fortran --disable-nls --disable-mult
ilib --disable-win32-registry --disable-werror --disable-bootstrap --disable-sym
vers --program-prefix=llvm- --enable-llvm=/home/ralph/llvm-objects --enable-full
y-dynamic-string --with-gxx-include-dir=/llvm/include/c++/4.2.1 --with-sysroot=/
usr
Thread model: win32
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
 f:/cb/llvm_gcc/llvm/bin/../libexec/gcc/i386-mingw32/4.2.1/cc1plus.exe -quiet -v
 -iprefix f:\cb\llvm_gcc\llvm\bin\../lib/gcc/i386-mingw32/4.2.1/ nul -quiet -dum
pbase nul -mtune=i386 -auxbase nul -version -fsyntax-only -o nul
ignoring nonexistent directory "f:/cb/llvm_gcc/llvm/bin/../lib/gcc/i386-mingw32/
4.2.1/../../../../i386-mingw32/include"
ignoring nonexistent directory "c:/codeblocks/llvm/include/c++/4.2.1"
ignoring nonexistent directory "c:/codeblocks/llvm/include/c++/4.2.1/i386-mingw3
2"
ignoring nonexistent directory "c:/codeblocks/llvm/include/c++/4.2.1/backward"
ignoring nonexistent directory "C:/CodeBlocksc:/codeblocks/llvm/lib/gcc/i386-min
gw32/4.2.1/../../../../include"
ignoring nonexistent directory "c:/codeblocks/llvm/lib/gcc/i386-mingw32/4.2.1/in
clude"
ignoring nonexistent directory "c:/codeblocks/llvm/i386-mingw32/include"
ignoring nonexistent directory "C:/CodeBlocks/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 f:/cb/llvm_gcc/llvm/bin/../lib/gcc/i386-mingw32/4.2.1/include
End of search list.
cc1plus.exe: warning: nul.gch: too short to be a PCH file
GNU C++ version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build) (i386-mingw3
2)
        compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5658) (LLVM b
uild).
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
Compiler executable checksum: 5faebdeec4705890ed271b3e78d3baee
nul:1: warning: 'nul.gcda' is not a gcov data file

F:\cb\llvm_gcc\LLVM\bin>

it seems all the path was something like:  "c:/codeblocks/llvm"....., but that does not work on my system, can this be relocatable?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #24 on: December 10, 2010, 09:50:08 pm »
ah aye i suspected something like that and no not atm else it wont build as pr the instructions on the llvm site :(

ill see if i can patch something up.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #25 on: December 13, 2010, 03:28:45 am »
btw untill i get the gcc build fixed you can use the llvm-gcc from llvm site. unfortunatly it doesnt include gfortran but atleast it seems to work relocatable.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #26 on: December 13, 2010, 01:38:49 pm »
new build up on google code.

patched with some of john's older patches for gcc-4.2.1.

it took a war getting it to recognize the c++ directory (wont bootstrap unless the llvm dir is named mingw and in the root) but it seems to compile fine in any dir after its built now.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Clang integration?
« Reply #27 on: December 13, 2010, 02:04:01 pm »
new build up on google code.

patched with some of john's older patches for gcc-4.2.1.

it took a war getting it to recognize the c++ directory (wont bootstrap unless the llvm dir is named mingw and in the root) but it seems to compile fine in any dir after its built now.

thanks, but why the package is 94M, so large??

http://code.google.com/p/mingw-wine/downloads/detail?name=LLVM.rar&can=2&q=
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #28 on: December 13, 2010, 02:48:32 pm »
winrar isn't as good at compressing ;)

also the svn version i built this from gained some extra libraries so it is indeed a bit bigger.

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Clang integration?
« Reply #29 on: December 13, 2010, 02:51:43 pm »
oh before i forget still not working with codeblocks :S the linker crashes with ntdll error.

i have no idea why since it works fine if done from commandline.