Ticket #313 (new task) — at Version 9
Opened 5 years ago
Last modified 9 months ago
add llvm and clang [needs testing]
| Reported by: | scottmc | Owned by: | omnimancer |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | sys-devel/llvm | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | mdisreali@… |
Change History
Changed 5 years ago by disreali
- attachment llvm-2.8.bep added
comment:1 Changed 5 years ago by disreali
- Cc mdisreali@… added
comment:2 follow-up: ↓ 3 Changed 4 years ago by darkwyrm
disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 4 years ago by disreali
Replying to darkwyrm:
disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.
Clang is tricker because its src needs to be in a subdir of the LLVM tree and I have not been able to figure out how to build clang without building llvm at the same time in the same tree.
comment:4 in reply to: ↑ 3 Changed 4 years ago by omnimancer
Replying to disreali:
Replying to darkwyrm:
disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.
Clang is tricker because its src needs to be in a subdir of the LLVM tree and I have not been able to figure out how to build clang without building llvm at the same time in the same tree.
If Cmake is used instead of the configure/make system then clang can be built outside of the LLVM tree, there is a small patch to the cmake files from llvm needed to allow this though, I will try to submit a patch to llvm for it in future.
comment:5 Changed 3 years ago by kallisti5
llvm added a flag to specify a clang source path after 3.0 was released... I backported the patch however:
11:47 <@kallisti5> clang bep has to use the llvm sources and point llvm to the clang sources 11:47 <@kallisti5> so by that point it makes more sense to just download llvm and extract clang into it 11:48 < Disreali> yeah, that is where I got very confused makeing a clang bep also 11:48 <@kallisti5> to do it the "right" way, the clang bep would need to enter the llvm bep build directory 11:48 < Disreali> exactly 11:49 <+jrabbit> so the clag bep should jsut do both? 11:49 < Disreali> jrabbit: that is the easiest way to do it 11:49 <+jrabbit> is there any reason to not want clang and want llvm? 11:49 < Disreali> sure 11:49 <+jrabbit> like is there a down side besides it being HORRIBLE :P 11:50 <@kallisti5> lol 11:50 < Disreali> lots of projects just use llvm. clag is only a C/C++ frontend 11:50 <@kallisti5> no real point to having llvm withoug clang 11:51 <@kallisti5> there are other frontends 11:51 <@kallisti5> and they should be seperate long term 11:51 <@kallisti5> but llvm is pretty bad at how it build frontends 11:51 <@kallisti5> you should build llvm, then point the clang build system at llvm sources if anything
Changed 3 years ago by kallisti5
- attachment llvm-3.0-autoregen.diff added
not used patch so Haiku can regenerate configure
Changed 3 years ago by kallisti5
- attachment llvm-3.0-srcdirv2.diff added
not used patch to 3.0 to backport llvm's new "--with-clang-srcdir" flag to 3.0
comment:6 Changed 3 years ago by disreali
Thanks for the new bep. I don't want to sound unappreciative, however, all sorts of stuff still gets created in /share/... I attempted to fix it but was unsuccessful. Hopefully someone with more experience can figure it out.
Thanks again for a working bep. It will be real fun to use clang on Haiku.
comment:7 Changed 3 years ago by disreali
- Summary changed from add llvm and clang to add llvm and clang [files attached, please review]
comment:8 Changed 3 years ago by scottmc
With r1849 and r1850, I have added an llvm-3.0.bep and a clang-3.0.bep, these have not been tested as I don't have a gcc4 installation on my pc at this time. Please check these over and update to a single patch for each if needed, such that the patch when put into the patches/ directory for llvm and clang in the haikuports tree that they will just build without any issues on a gcc4 install. If you need more than a single patch, please try to combine them down into one if possible. If there are issues with the .bep I just added be sure to post corrected versions here as well. If llvm 3.0 does not work but 2.8 does then let me know that as well. It was not easy figuring out which files were/were not needed here, so a little better direction would be helpful next time.
comment:9 Changed 3 years ago by scottmc
- Description modified (diff)
- Summary changed from add llvm and clang [files attached, please review] to add llvm and clang [needs testing]

Initial llvm.bep file attached. not yet tested.