[Openmp-commits] [PATCH] D150687: [OpenMP]Fix trivial build failure in MacOS

Mats Petersson via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 17 03:29:47 PDT 2023


Leporacanthicus added a comment.

In D150687#4346761 <https://reviews.llvm.org/D150687#4346761>, @tianshilei1992 wrote:

> Hmm, I'm not sure if we want to include `<cmath>` here because `libomp` definitely doesn't depend on `libm`. We might want to deal with it in https://reviews.llvm.org/D149010 instead.

I guess we could include `cstdlib` instead, would that be better. If you think that's better, let me know, happy to update the patch.

The other alternative would be to "not use `std::abs`" - but to me that doesn't seem like a great solution. [Interestingly, the file kmp_stats.cpp, line 181 does call `std::fabs`, but I guess that is done inline, so it doesn't actually use libm anyway] - and includes `<cmath>` - maybe kmp_stats.cpp is "special" here? I'm happy for someone else to fix this - my main reason for posting this patch was to help some colleagues of mine move on - which they are now able to do. If another fix is done elsewhere, I'm happy to abandon this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150687/new/

https://reviews.llvm.org/D150687



More information about the Openmp-commits mailing list