typhon icon indicating copy to clipboard operation
typhon copied to clipboard

Translate with Clang

Open MostAwesomeDude opened this issue 7 years ago • 3 comments

Somebody should figure this out at some point.

MostAwesomeDude avatar May 11 '17 04:05 MostAwesomeDude

typhonVm.override { stdenv = clangStdenv; }

washort avatar May 20 '17 11:05 washort

Initial tests unpromising.

[platform:Error] Traceback (most recent call last):
[platform:Error]   File "/tmp/nix-build-typhon-vm.drv-0/typhon/rpython/translator/c/gcc/trackgcroot.py", line 2087, in <module> 
[platform:Error]     tracker.process(f, g, filename=fn)
[platform:Error]   File "/tmp/nix-build-typhon-vm.drv-0/typhon/rpython/translator/c/gcc/trackgcroot.py", line 1978, in process
[platform:Error]     for in_function, lines in parser.find_functions(iterlines):
[platform:Error]   File "/tmp/nix-build-typhon-vm.drv-0/typhon/rpython/translator/c/gcc/trackgcroot.py", line 1528, in find_functions
[platform:Error]     "missed the end of the previous function")
[platform:Error] AssertionError: missed the end of the previous function
[platform:Error] make: *** [Makefile:253: testing_1.gcmap] Error 1

washort avatar Jun 05 '17 03:06 washort

The asmgcc gcrootfinder, which was the default until recently, doesn't work with Clang. You need to pass --gcrootfinder=shadowstack as an RPython option. RPython options are passed in here between -mrpython and main.py: https://github.com/monte-language/typhon/blob/9dffc61cccfc1a114d58615f65f696bb69075f32/nix-support/vm.nix#L46

manueljacob avatar Aug 09 '17 01:08 manueljacob