diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 00b30c4d6b..d25034706d 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -169,9 +169,10 @@ def cmake_args(self): archs = self.spec.variants['amdgpu_target'].value if archs != 'none': arch_str = ",".join(archs) + cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags']) args.append( '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' - ' -g -fsized-deallocation -fPIC'.format(arch_str) + ' -g -fsized-deallocation -fPIC {1}'.format(arch_str, cxxflags_str) ) # Add support for OS X to find OpenMP (LLVM installed via brew) diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index cca38f266e..635f536e99 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -358,9 +358,11 @@ def cmake_args(self): archs = self.spec.variants['amdgpu_target'].value if archs != 'none': arch_str = ",".join(archs) + cxxflags_str = " ".join(self.spec.compiler_flags['cxxflags']) args.append( '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' - ' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) + ' -g -fsized-deallocation -fPIC -std=c++17 {1}'.format( + arch_str, cxxflags_str) ) return args