Skip to content
Snippets Groups Projects
Unverified Commit 8b515f3b authored by Dr Owain Kenway's avatar Dr Owain Kenway Committed by GitHub
Browse files

flang: make sure to find libstdc++ if needed (#17480)

parent d5125374
Branches
Tags
No related merge requests found
...@@ -71,6 +71,11 @@ def cmake_args(self): ...@@ -71,6 +71,11 @@ def cmake_args(self):
spec['python'].command.path) spec['python'].command.path)
] ]
# Make sure llvm-flang can find GCC's libstdc++
if self.compiler.name == "gcc":
gcc_prefix = ancestor(self.compiler.cc, 2)
options.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix)
if '+cuda' in spec: if '+cuda' in spec:
options.append('-DFLANG_OPENMP_GPU_NVIDIA=ON') options.append('-DFLANG_OPENMP_GPU_NVIDIA=ON')
else: else:
......
...@@ -195,6 +195,11 @@ def cmake_args(self): ...@@ -195,6 +195,11 @@ def cmake_args(self):
args.append('-DLIBOMP_FORTRAN_MODULES=ON') args.append('-DLIBOMP_FORTRAN_MODULES=ON')
args.append('-DLIBOMP_ENABLE_SHARED=TRUE') args.append('-DLIBOMP_ENABLE_SHARED=TRUE')
# Make sure llvm-flang can find GCC's libstdc++
if self.compiler.name == "gcc":
gcc_prefix = ancestor(self.compiler.cc, 2)
args.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix)
# used by libomptarget for NVidia gpu # used by libomptarget for NVidia gpu
if '+cuda' in spec: if '+cuda' in spec:
args.append('-DOPENMP_ENABLE_LIBOMPTARGET=ON') args.append('-DOPENMP_ENABLE_LIBOMPTARGET=ON')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment