Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Duplication of Compilation Logic on the mx and Java side #82

Closed
mrigger opened this issue Mar 10, 2016 · 4 comments
Closed

Duplication of Compilation Logic on the mx and Java side #82

mrigger opened this issue Mar 10, 2016 · 4 comments

Comments

@mrigger
Copy link
Collaborator

mrigger commented Mar 10, 2016

Currently, the logic for compiling a file written in C, C++, or Fortran to LLVM IR or machine code is once on the Java side and once on the mx side. In Java, the test framework uses classes like GCC and opt. In mx, there are equivalent functions like compileWithGCC and opt.

It would be nice to remove this duplication of logic to easy maintenance when, e.g., adopting new versions of LLVM or GCC. It would probably be best to remove the Java part, since mx already takes care of downloading the dependencies. The Java part could then have a mx class from which the test framework can compile source files.

@chrisseaton
Copy link
Contributor

Hmm I disagree. I think the logic for compiling language source files to LLVM IR should move completely into Java, including logic for finding or downloading compilers for you. Putting it into mx makes sense for development of Sulong, and for libraries shipped with R, but how will that work when we want to ship Sulong and compile source on the end user's machines like with Ruby C extensions?

@lukasstadler
Copy link
Member

in R we also don't have mx at package installation time, we need to be able to do this from a makefile.

@mrigger
Copy link
Collaborator Author

mrigger commented Mar 10, 2016

Then I guess it would make more sense to remove the compilation logic from the mx side and move it to the Java side. For R, we can use whole-program-llvm or a similar tool.

@grimmerm
Copy link
Contributor

grimmerm commented Dec 2, 2016

#601

@grimmerm grimmerm closed this as completed Dec 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants