flang: make sure to find libstdc++ if needed (#17480)
This commit is contained in:
parent
d512537417
commit
8b515f3ba0
@ -71,6 +71,11 @@ def cmake_args(self):
|
||||
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:
|
||||
options.append('-DFLANG_OPENMP_GPU_NVIDIA=ON')
|
||||
else:
|
||||
|
@ -195,6 +195,11 @@ def cmake_args(self):
|
||||
args.append('-DLIBOMP_FORTRAN_MODULES=ON')
|
||||
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
|
||||
if '+cuda' in spec:
|
||||
args.append('-DOPENMP_ENABLE_LIBOMPTARGET=ON')
|
||||
|
Loading…
Reference in New Issue
Block a user