[clang] 504cf55 - [InstallAPI] Pass explicit module cache to avoid permissions issues.
Cyndy Ishida via cfe-commits
cfe-commits at lists.llvm.org
Fri May 10 17:19:17 PDT 2024
Author: Cyndy Ishida
Date: 2024-05-10T17:17:38-07:00
New Revision: 504cf554639360525c3f746e7296a242350b2af9
URL: https://github.com/llvm/llvm-project/commit/504cf554639360525c3f746e7296a242350b2af9
DIFF: https://github.com/llvm/llvm-project/commit/504cf554639360525c3f746e7296a242350b2af9.diff
LOG: [InstallAPI] Pass explicit module cache to avoid permissions issues.
Fixes: https://lab.llvm.org/buildbot/#/builders/192/builds/9313
Added:
Modified:
clang/test/InstallAPI/project-header-only-args.test
clang/tools/clang-installapi/Options.cpp
Removed:
################################################################################
diff --git a/clang/test/InstallAPI/project-header-only-args.test b/clang/test/InstallAPI/project-header-only-args.test
index 7147c83b0f5d4..76fecce5b4a26 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 5396ad23620b9..53340da704fc0 100644
--- a/clang/tools/clang-installapi/Options.cpp
+++ b/clang/tools/clang-installapi/Options.cpp
@@ -299,8 +299,11 @@ bool Options::processXprojectOption(InputArgList &Args, arg_iterator Curr) {
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();
More information about the cfe-commits
mailing list