mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Add -prefix-serialized-debugging-options" (#39544)
Reverts #39138 This is causing a failure on Windows: https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/6659/consoleText
This commit is contained in:
committed by
GitHub
parent
5e06bbe2ea
commit
f5aa95b381
@@ -408,56 +408,3 @@ DiagnosticBehavior LangOptions::getAccessNoteFailureLimit() const {
|
||||
}
|
||||
llvm_unreachable("covered switch");
|
||||
}
|
||||
|
||||
std::vector<std::string> ClangImporterOptions::getRemappedExtraArgs(
|
||||
std::function<std::string(StringRef)> pathRemapCallback) const {
|
||||
auto consumeIncludeOption = [](StringRef &arg, StringRef &prefix) {
|
||||
static StringRef options[] = {"-I",
|
||||
"-F",
|
||||
"-fmodule-map-file=",
|
||||
"-iquote",
|
||||
"-idirafter",
|
||||
"-iframeworkwithsysroot",
|
||||
"-iframework",
|
||||
"-iprefix",
|
||||
"-iwithprefixbefore",
|
||||
"-iwithprefix",
|
||||
"-isystemafter",
|
||||
"-isystem",
|
||||
"-isysroot",
|
||||
"-ivfsoverlay",
|
||||
"-working-directory=",
|
||||
"-working-directory"};
|
||||
for (StringRef &option : options)
|
||||
if (arg.consume_front(option)) {
|
||||
prefix = option;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// true if the previous argument was the dash-option of an option pair
|
||||
bool remap_next = false;
|
||||
std::vector<std::string> args;
|
||||
for (auto A : ExtraArgs) {
|
||||
StringRef prefix;
|
||||
StringRef arg(A);
|
||||
|
||||
if (remap_next) {
|
||||
remap_next = false;
|
||||
args.push_back(pathRemapCallback(arg));
|
||||
} else if (consumeIncludeOption(arg, prefix)) {
|
||||
if (arg.empty()) {
|
||||
// Option pair
|
||||
remap_next = true;
|
||||
args.push_back(prefix.str());
|
||||
} else {
|
||||
// Combine prefix with remapped path value
|
||||
args.push_back(prefix.str() + pathRemapCallback(arg));
|
||||
}
|
||||
} else {
|
||||
args.push_back(A);
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user