ports/devel/llvm12/files/patch-fopenmp.diff
Brooks Davis 85e3df44bd Welcome LLVM 12 (12.0.0rc2) to the tree
Notable *port* changes (vs devel/llvm11):
 - Switch to single llvm-project distfile.  This simplifies the port
   and support for the old style build process is rotting upstream
   after the mono-repo conversion.
 - Disable libedit dependency in libLLVM (still used by LLDB).  This
   is one small step toward a dependency-less clang.
 - LLDB docs are disabled due to issues finding python includes when
   autogenerating API docs.

Sponsored by:	 DARPA
2021-03-05 01:47:32 +00:00

14 lines
626 B
Diff

--- clang/lib/Driver/ToolChains/CommonArgs.cpp.orig 2017-05-10 17:18:56.000000000 +0000
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp 2017-05-10 23:01:17.087686000 +0000
@@ -441,7 +441,10 @@
switch (TC.getDriver().getOpenMPRuntime(Args)) {
case Driver::OMPRT_OMP:
- CmdArgs.push_back("-lomp");
+ if (TC.getTriple().getOS() != llvm::Triple::FreeBSD || TC.isCrossCompiling() || !llvm::sys::fs::exists("%%LLVM_PREFIX%%/lib/libomp.so"))
+ CmdArgs.push_back("-lomp");
+ else
+ CmdArgs.push_back("%%LLVM_PREFIX%%/lib/libomp.so");
break;
case Driver::OMPRT_GOMP:
CmdArgs.push_back("-lgomp");