vgvassilev / cling

The interactive C++ interpreter Cling
https://rawgit.com/vgvassilev/cling/master/www/index.html
Other
1.76k stars 102 forks source link

Allow Cling build using LLVM binary #204

Closed reikdas closed 4 years ago

reikdas commented 4 years ago

Current status -

vgvassilev commented 4 years ago

Sorry for being slow. I was off. Do we know why half of the builds fail?

reikdas commented 4 years ago

Only the build failure of the test instance with GCC 4.8 is unknown. The remaining builds that fail are because of the failing Autoforwarding test in check-cling.

reikdas commented 4 years ago

To fix the remaining single test failure, I'd need to know the exact values of these lines https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L314-L315

config.llvm_src_root + '/tools/clang' is /tmp/final/llvm.src/tools/clang config.llvm_src_root + '/tools/cling' is /tmp/final/llvm.src/tools/cling (This does not exist because cling is not being built as a LLVM tool in this case but as a Clang tool)

vgvassilev commented 4 years ago

To fix the remaining single test failure, I'd need to know the exact values of these lines https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L314-L315

config.llvm_src_root + '/tools/clang' is /tmp/final/llvm.src/tools/clang config.llvm_src_root + '/tools/cling' is /tmp/final/llvm.src/tools/cling (This does not exist because cling is not being built as a LLVM tool in this case but as a Clang tool)

Then we will probably just need an or here: https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L315

reikdas commented 4 years ago

Then we will probably just need an or here: https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L315

Didn't work :( Although, I didn't expect it to because putting this line - https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L316 outside of the conditional block does not work either.

To fix the remaining single test failure, I'd need to know the exact values of these lines https://github.com/vgvassilev/cling/blob/master/test/lit.cfg#L314-L315

config.llvm_src_root + '/tools/clang' is /tmp/final/llvm.src/tools/clang config.llvm_src_root + '/tools/cling' is /tmp/final/llvm.src/tools/cling

I got these values by putting print statements for the above in that same file. But checking /tmp directory, there is no final folder inside it. (After a fresh build) I am not sure how the llvm_src_root variable in this line - https://github.com/vgvassilev/cling/blob/master/test/lit.site.cfg.in#L4 is set to /tmp/final in this case.

Going through cpt's logs I found that it installs the files to /tmp/cling-obj/ and removes that directory after the script finishes executing.

vgvassilev commented 4 years ago

Can make this line unconditional to see if the test would pass?

Otherwise, I am happy with the rest of the changes. We have a lot of work ahead. Could you squash your commits into minimal but atomic changes?

reikdas commented 4 years ago

Can make this line unconditional to see if the test would pass?

Autoforwarding passes but now test Cling :: CodeUnloading/RunAgainstClangTestSuite/RunAgainstClangTestSuite.C fails. This test relies on vanilla-cling (https://github.com/vgvassilev/cling/blob/master/test/CodeUnloading/RunAgainstClangTestSuite/RunAgainstClangTestSuite.C#L3).

vgvassilev commented 4 years ago

Can make this line unconditional to see if the test would pass?

Autoforwarding passes but now test Cling :: CodeUnloading/RunAgainstClangTestSuite/RunAgainstClangTestSuite.C fails. This test relies on vanilla-cling (https://github.com/vgvassilev/cling/blob/master/test/CodeUnloading/RunAgainstClangTestSuite/RunAgainstClangTestSuite.C#L3).

That's different. This is because here we compute the location of the clang source directory assuming cling is next to clang. We can adjust it if we add a variable in lit.cfg containing the actual clang location.