-# On SunOS use the libraries from the GCC used to build clang rather than
-# aimlessly searching the file system for ones that might be incompatible.
-#
-SUBST_CLASSES.SunOS+= sunos-gcc
-SUBST_STAGE.sunos-gcc= pre-configure
-SUBST_FILES.sunos-gcc= lib/Driver/ToolChains/Gnu.cpp
-SUBST_SED.sunos-gcc= -e 's,@GCCBASEDIR@,${CCPATH:H:H},'
-
-# Not perfect, but should catch most common cases. We can't simply use
-# gcc-libs as that doesn't ship the headers.
-#
-.if ${OPSYS} == "SunOS" && ${PKGSRC_COMPILER:Mgcc}
-BUILDLINK_DEPMETHOD.${_GCC_PKGBASE}= full
+# Enable full LLVM suite on SunOS
+.if ${OPSYS} == "SunOS"
+.include "../../lang/compiler-rt/buildlink3.mk"
+.include "../../lang/libcxx/buildlink3.mk"
+.include "../../lang/libcxxabi/buildlink3.mk"
+.include "../../lang/libunwind/buildlink3.mk"
+CMAKE_ARGS+= -DCLANG_DEFAULT_RTLIB:STRING="compiler-rt"
+CMAKE_ARGS+= -DCLANG_DEFAULT_CXX_STDLIB:STRING="libc++"