-
Notifications
You must be signed in to change notification settings - Fork 17
[Build script] Add compilation script #83
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
Conversation
I think, it makes sense to do with cmake: The main advantage of this approach - you may use either a local folder, findpackage or git repo. |
Let's have one working script instead of two |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two notes to think about. You also mentioned conda in our talk, I cannot see a conda env here
scripts/compile-dev.sh
Outdated
echo $project_dir | ||
mlir_dir=$PWD/build/lib/cmake/mlir | ||
popd | ||
popd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consider using pushd
/ popd
bad practice, they are not local. Use cd
instead. Another option is to use round brackets to do something in a separate shell, then you return to the default dir
Since this is a dev script, could we use the dynamic linking, introduced in this #66 PR? It will make the build/debug faster. |
f2aa6cf
to
287c1ce
Compare
I've tried, but default built failed with this option. Don't know how to enable it properly. (checked with |
f053836
to
6d20519
Compare
It fails for me either :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@Menooker would you please help to enable this? |
GC_DEV_LINK_LLVM_DYLIB requires the LLVM built with cmake option
|
In some cases, when using different versions of the compiler/libc to build the llvm-project and other parts of the project, linking errors occur. To avoid this, a new compilation script has been added that will build the llvm project in the specified environment. Also external projects will be saved in the externals folder so that the user can delete the build directory separately from the external projects. Signed-off-by: Dmitrii Makarenko <[email protected]>
6d20519
to
4df9e0f
Compare
thanks for the hint, updated script to handle this option. |
|
||
args=$(getopt -a -o dlh --long dev,dyn,help -- "$@") | ||
if [[ $? -gt 0 ]]; then | ||
echo "first" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this echo
here by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, sorry, thanks for pointing this. It was done for debug
args=$(getopt -a -o dlh --long dev,dyn,help -- "$@") | ||
if [[ $? -gt 0 ]]; then | ||
echo "first" | ||
print_usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print_usage | |
print_usage | |
exit 1 |
In some cases, when using different versions of the compiler/libc to build the llvm-project and other parts of the project, linking errors occur. To avoid this, a new compilation script has been added that will build the llvm project in the specified environment.
Also external projects will be saved in the externals folder so that the user can delete the build directory separately from the external projects.