mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Emit path to clang from PCM build command-line
It gets interpreted as just an executable we feed to the linker, since we launch `emit-pcm` actions via `swift-frontend` invocations, not `clang`.
This commit is contained in:
@@ -242,6 +242,13 @@ void ClangImporter::recordModuleDependencies(
|
||||
// from the depending Swift modules.
|
||||
if (arg == "-target") {
|
||||
It += 2;
|
||||
} else if (arg == "clang" ||
|
||||
arg.endswith(llvm::sys::path::get_separator().str() + "clang")) {
|
||||
// Remove the initial path to clang executable argument, to avoid
|
||||
// treating it as an executable input to compilation. It is not needed
|
||||
// because the consumer of this command-line will invoke the emit-PCM
|
||||
// action via swift-frontend.
|
||||
It += 1;
|
||||
} else if (arg.startswith("-fapinotes-swift-version=")) {
|
||||
// Remove the apinotes version because we should use the language version
|
||||
// specified in the interface file.
|
||||
|
||||
Reference in New Issue
Block a user