Skip to content

Commit 504cf55

Browse files
committed
[InstallAPI] Pass explicit module cache to avoid permissions issues.
Fixes: https://lab.llvm.org/buildbot/#/builders/192/builds/9313
1 parent f8063ff commit 504cf55

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

clang/test/InstallAPI/project-header-only-args.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
; RUN: rm -rf %t
22
; RUN: split-file %s %t
33
; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
4+
; RUN: mkdir -p %t/modules.cache
45

56
; RUN: clang-installapi \
67
; RUN: -target arm64-apple-macos12 -install_name @rpath/libfoo.dylib \
78
; RUN: -current_version 1 -compatibility_version 1 \
89
; RUN: -Xproject -fmodules -I%t/usr/include \
10+
; RUN: -Xproject -fmodules-cache-path=%t/modules.cache \
911
; RUN: -F %S/Inputs/Foundation/ \
1012
; RUN: -exclude-public-header %t/usr/include/public.h \
1113
; RUN: -extra-project-header %t/project.h -I%t -dynamiclib \
@@ -17,6 +19,7 @@
1719
; RUN: -target arm64-apple-macos12 -install_name @rpath/libfoo.dylib \
1820
; RUN: -current_version 1 -compatibility_version 1 \
1921
; RUN: -Xproject -fmodules -I%t/usr/include \
22+
; RUN: -Xproject -fmodules-cache-path=%t/modules.cache \
2023
; RUN: -extra-project-header %t/project.h \
2124
; RUN: -F %S/Inputs/Foundation/ \
2225
; RUN: %t/inputs.json \

clang/tools/clang-installapi/Options.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,11 @@ bool Options::processXprojectOption(InputArgList &Args, arg_iterator Curr) {
299299
return false;
300300
}
301301

302-
ProjectLevelArgs.push_back(NextA->getSpelling().str());
303-
llvm::copy(NextA->getValues(), std::back_inserter(ProjectLevelArgs));
302+
std::string ArgString = NextA->getSpelling().str();
303+
for (const StringRef Val : NextA->getValues())
304+
ArgString += Val.str();
305+
306+
ProjectLevelArgs.push_back(ArgString);
304307
A->claim();
305308
NextA->claim();
306309

0 commit comments

Comments
 (0)