catb0t / tart

Automatically exported from code.google.com/p/tart
0 stars 0 forks source link

Compiling with -g requires -sourcepath with absolute path #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Create a simple 'Hello World' module and name it Hello.tart.

Compiling the source with the command

tartc -i<path to tart lib> Hello.tart

produces a bitcode file.

Compiling with

tartc -g -i<path to tart lib> Hello.tart

results in the error message:
..\..\tart\trunk\compiler\lib\Gen\CodeGenDebug.cpp:55: Assertion failed 
(srcPath.isAbsolute())

The workaround is to add parameter -sourcepath using an absolute path. (A 
relative path does not work, too.)

Sorry, no fix this time.

Original issue reported on code.google.com by kai.na...@gmail.com on 15 Oct 2010 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by viri...@gmail.com on 18 Oct 2010 at 8:48

GoogleCodeExporter commented 8 years ago
I'm sorry that I haven't had a chance to work on this - I've been focused on 
trying to get DWARF debugging to work, and haven't thought about much else.

I can think of two approaches that can be used to get an absolute path. Once is 
to modify the CMakeLists.txt using the various CMake commands such as 
get_filename_component. The other approach is to fix tartc directly. If you 
have any thoughts on which approach would be better, I would be interested to 
hear them.

Original comment by viri...@gmail.com on 23 Oct 2010 at 8:20

GoogleCodeExporter commented 8 years ago
I found the problem while using the compiler on the command line, just typing 
tartc -i..... <some module>.
Therefore I would fix tartc. The CMakeLists.txt seems to be ok. At least I 
observed no problem with it.

Original comment by kai.na...@gmail.com on 4 Nov 2010 at 4:35