Skip to content

Commit

Permalink
[Xcode] "Check .xcfilelists" script phases don't need to run on every…
Browse files Browse the repository at this point in the history
… build

https://bugs.webkit.org/show_bug.cgi?id=261281
rdar://115123881

Reviewed by Alexey Proskuryakov.

Make each "Check .xcfilelists" build phase depend on its
DerivedSources.make file, and output a timestamp file. This allows
XCBuild to incrementalize it properly and avoid re-running it on every
build. It also works towards preventing WebKit's module verifier from
re-running every build and being scheduled late in the target build.

Each xcfilelist generator parses its respective Makefile to determine
its input and output paths, so it's fair to expect the Makefile to
always change when there are new inputs/outputs. Technically this is not
true--Make is free to declare targets nondeterministically--but in
practice, commits which changes xcfilelists also change
DerivedSources.make.

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj:
* Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/267805@main
  • Loading branch information
emw-apple committed Sep 8, 2023
1 parent 7bf2dd5 commit fae8124
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12260,15 +12260,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
5366FDB222D5485B00BF94AF /* Copy Support Scripts */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
4 changes: 3 additions & 1 deletion Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42492,15 +42492,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
4 changes: 3 additions & 1 deletion Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16397,15 +16397,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
5C1578E6270E129400ED5280 /* Process adattributiond Entitlements */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
4 changes: 3 additions & 1 deletion Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3229,15 +3229,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "scripts/check-xcfilelists.sh\n";
shellScript = "scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
537CF84222EFC4E400C6EBB3 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1009,15 +1009,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
4 changes: 3 additions & 1 deletion Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6082,15 +6082,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
5C9D921C22D7DA33008E9266 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,15 +1190,17 @@
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/DerivedSources.make",
);
name = "Check .xcfilelists";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_TEMP_DIR)/check-xcfilelists.timestamp",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "Scripts/check-xcfilelists.sh\n";
shellScript = "Scripts/check-xcfilelists.sh && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n";
};
BC952D8211F3BF78003398B4 /* Generate Derived Sources */ = {
isa = PBXShellScriptBuildPhase;
Expand Down

0 comments on commit fae8124

Please sign in to comment.