Conversation
I think you need to update the test case in |
Ok, done. Will create a pull-request for clang-omp as soon as this is accepted |
@xu-cheng ...and the test failed because the clang-omp test doesn't work anymore. Any suggestions? the pull request for clang-omp will also fail because it will still use the old libiomp... |
You can update |
Nice, it worked! |
If I want to build something against OpenMPI with gcc while I have clang-omp installed, does having this header directly in HOMEBREW_PREFIX/include cause trouble for my gcc build? Ping @metacollin. |
@tdsmith I haven't tested it out yet but it looks like only bin is linked, the headers are in libexec. e: Whoops, wrong formula. In this case |
@xu-cheng How about pulling this one in? Thanks! |
Ed: No, I was confused. I'll see what the bottle looks like when it's rebuilt. |
@BrewTestBot test this please |
Ping @tdsmith |
Oh, I let the damn build expire again, shame on me. @BrewTestBot test this please |
@BrewTestBot test this please |
Ping @tdsmith in case you forget again. 😃 |
Thanks 😅 This does install a
and I would like to not put this omp.h in the default search path. Can we teach clang-omp an additional default header search path? |
I think there is a talking that we should vendor libiomp inside clang-omp and boneyard this formula. It seems libiomp is only used by clang-omp. See #38707. |
Also FWIW, I would like to have clang-omp supported in homebrew compiler list. So if a formula |
Sorry, been busy :(. Custom include paths must be added by setting the precompiler define C_INCLUDE_DIRS to the paths. C_INCLUDE_DIRS is searched after the default search paths, so we can simply add whereever libiomp's include directory lives. One can find the actual #define near the top of llvm/tools/clang/include/clang/Config/config.h (It's the second or third define I believe). Also, according to http://clang.llvm.org/get_started.html , cmake is the standard and preferred build system (I am not sure if this changed recently or its said that for a while and I never noticed heh). The cmakelists for clang will safely insert whatever we want into the config.h file, we simply pass Otherwise, we might consider switching the build system to cmake, which shouldn't be that big a problem. Also, my personal opinion is that libiomp should remain a separate formula. It's a runtime library, one does not actually need it to build clang-omp, or even compile OpenMP aware programs, it is only needed to execute them. Intel releases new versions of the runtime fairly often, often with bug fixes and performance improvements, and it's an open OpenMP API runtime project, and can be used by any compiler, and should be a separate formula if only to make it available to developers using homebrew that are interested in adding OpenMP support to a compiler. And there is potential for other things to use the runtime, even if the only forumla currently using it is clang-omp. But that's just my opinion, either way it's not going to be terrible if its separate, or terrible if its rolled in as a resource block in the clang-omp formula either. Just my two satoshis on the subject. |
D'oh, its done with Forget about the cmake stuff heh. For being so easy, it sure isn't documented anywhere in the clang online docs. I discovered it looking through the configure script. I am going to do a pull request momentarily, I'm waiting for clang to rebuild to double check that this actually does what it's supposed to. I'm on a 2008 Mac Pro, so clang takes a while to build =/. |
Neat; Is there a corresponding option for linking libiomp5.dylib? |
tdsmith, yep, that's what I am testing as we speak! As for linking libiomp5, the name is unique, nothing will link to it unless it means to. If it were called libomp, it might be a problem, but there is one and only one library with the 'i' in front of the omp, and that's intel's runtime, with i signifying intel. Regardless, I am looking for info on how to add a custom lib search path to clang, but haven't found anything yet. |
That makes sense; let's not worry about hiding the library. I think it could be helpful if Homebrew is installed to a prefix other than /usr/local but people who do that should know how to use LDFLAGS. |
|
Nothing needs an update I think. I just tested it on my machine with the new clang-omp. Perhaps trigger a rebuild and see what happens? |
You need to rebase and remove the head file installation location change |
this ok? |
@@ -35,7 +35,7 @@ def install | |||
system "cmake", ".", *args | |||
system "make", "all", "common" | |||
|
|||
(include/"libiomp").install Dir["exports/common/include/*"] |
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.
Don't change this. It should be installed in include/libiomp
now.
version bump
Ok, done |
Uh, please ignore my deleted posts. I completely misunderstood what was going on. Excited for this update :D Thanks tschoonj. |
Thanks for the pull request! 🎉 Homebrew depends on contributions from community members like you and we're grateful for your support. |
version bump
header installation path changed to prefix/include
see also discussion in #38707