[InstallAPI] Pass explicit module cache to avoid permissions issues.

Fixes: https://lab.llvm.org/buildbot/#/builders/192/builds/9313
diff --git a/clang/test/InstallAPI/project-header-only-args.test b/clang/test/InstallAPI/project-header-only-args.test
index 7147c83..76fecce 100644
--- a/clang/test/InstallAPI/project-header-only-args.test
+++ b/clang/test/InstallAPI/project-header-only-args.test
@@ -1,11 +1,13 @@
 ; RUN: rm -rf %t
 ; RUN: split-file %s %t
 ; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
+; RUN: mkdir -p %t/modules.cache
 
 ; RUN: clang-installapi \
 ; RUN: -target arm64-apple-macos12 -install_name @rpath/libfoo.dylib \
 ; RUN: -current_version 1 -compatibility_version 1 \
 ; RUN: -Xproject -fmodules -I%t/usr/include \
+; RUN: -Xproject -fmodules-cache-path=%t/modules.cache \
 ; RUN: -F %S/Inputs/Foundation/ \
 ; RUN: -exclude-public-header %t/usr/include/public.h \
 ; RUN: -extra-project-header %t/project.h -I%t -dynamiclib \
@@ -17,6 +19,7 @@
 ; RUN: -target arm64-apple-macos12 -install_name @rpath/libfoo.dylib \
 ; RUN: -current_version 1 -compatibility_version 1 \
 ; RUN: -Xproject -fmodules -I%t/usr/include \
+; RUN: -Xproject -fmodules-cache-path=%t/modules.cache \
 ; RUN: -extra-project-header %t/project.h \
 ; RUN: -F %S/Inputs/Foundation/ \
 ; RUN: %t/inputs.json \
diff --git a/clang/tools/clang-installapi/Options.cpp b/clang/tools/clang-installapi/Options.cpp
index 5396ad2..53340da 100644
--- a/clang/tools/clang-installapi/Options.cpp
+++ b/clang/tools/clang-installapi/Options.cpp
@@ -299,8 +299,11 @@
     return false;
   }
 
-  ProjectLevelArgs.push_back(NextA->getSpelling().str());
-  llvm::copy(NextA->getValues(), std::back_inserter(ProjectLevelArgs));
+  std::string ArgString = NextA->getSpelling().str();
+  for (const StringRef Val : NextA->getValues())
+    ArgString += Val.str();
+
+  ProjectLevelArgs.push_back(ArgString);
   A->claim();
   NextA->claim();