-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduced SCALANATIVE_CC
, SCALANATIVE_CXX
and SCALANATIVE_LLVM_CONFIG
#2362
base: main
Are you sure you want to change the base?
Conversation
…CONFIG` An idea of this changes is simple: let user to control which clang or llvm-config is used to build an application. Right now it picks some clang from PATH which might be quite wrong.
This can already be configured with the |
For |
@sjrd it required to change @WojciechMazur at machine which I'm using to build, to be hones, I haven't got any Usually any build system support Different packeting system uses different way to detect the right compiler. For example MacPorts has My idea => if user know exact path to clang, let allow him to use it. |
@sjrd about your way. Let assume that I have I've added to
and run
How should I ask scala-native to use the right compiller? |
@WojciechMazur FYI the old way allows to adjust clang or clang++ path via |
Can't you just pass LLVM_BIN instead? In
Then when running sbt with |
@WojciechMazur my point that I just would like to recover this environment some how. |
You can use the |
@sjrd anyway, => I just would like to save this way for the next releases. |
I understand this concern. At the same time setting LLVM directory instead of it's separate binaries will require less maintance in the future and should be easier for the users, especially since you should set both clang and clang++ to point to the same version. Also Graal Native Image uses just single env 'LLVM_TOOLCHAIN' or 'llvm.home' system property. |
It does seem that I did a lot of searching and could not find any reason for the prior setup and did find a usage of
You should be able to do the following as
|
If GraalVM is already using LLVM_TOOLCHAIN similarly to LLVM_BIN, don't you think it could be simpler to use the same variable name? |
@WojciechMazur I don't know GraalVM code base but it seems for me that it can use |
@ekrich this is still different behaviour with Thus, if you haven't define |
@catap I am looking into changing the discovery. I believe your withClang should have worked. I have a good idea on how to improve this. |
Thus, addung I still think that supporting: Because otherwise any maintanier who would like to pack SN application will have a nightmare. |
Yes, I don't believe the configuration is all figured out yet. Do you have any specifics on what you are doing, have in your I also think that published projects need to be allowed to setup flags because there is no way that the users can know what flags to pass and that is for the whole build not dependency by dependency. |
@ekrich I've try to create a few simple ports for macports for SN application.
Any SN application requires Also, MacPorts provides different compilers and it requires that specified compiler are used, and not I feel that any packaging manager (deb, rpm, you name it) => may need to add this flags like any another build system allows. Right now the only way is patching |
An idea of this changes is simple: let user to control which clang or llvm-config is used to build an application.
Right now it picks some clang from PATH which might be quite wrong.