Changeset 248813 in webkit


Ignore:
Timestamp:
Aug 16, 2019 8:45:45 PM (5 years ago)
Author:
Keith Rollin
Message:

Add XCBuild support to ANGLE
https://bugs.webkit.org/show_bug.cgi?id=200836
<rdar://problem/54410420>

Reviewed by Alex Christensen.

The ANGLE Xcode project contains two Build Phases: one that copies
some headers, and another that modifies those headers. This
combination does not work with XCBuild, which gets confused when it
finds that headers that it's copied have been changed. When it detects
this, XCBuild thinks that it should recopy those headers on the next
build, causing their modification dates to change and for all
dependent files to be rebuilt. This essentially turns an incremental
rebuild into a full rebuild.

Address this problem by using a new facility in Xcode 11. This
facility supports the copying and modifying headers files in a single
step. It is achieved by first enabling the facility by setting
APPLY_RULES_IN_COPY_HEADERS to YES. Next, we add a new Build Rule that
invokes a custom script when the header files are copied. Third, we
provide this script, which can essentially be a stripped down version
of the one already used to modify the exported headers files. Finally,
we disable the use of that old script when we are using Xcode 11. In
this way, the old script that modifies the exported headers is used in
Xcode 10, and the new facility is used in Xcode 11.

See also Bug 197340 for where this process was also applied to
JavaScriptCore, WebKit, and WebKitLegacy.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE.xcconfig:
  • adjust-angle-include-paths-rule: Added.
Location:
trunk/Source/ThirdParty/ANGLE
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj

    r247315 r248813  
    630630                FB39D76E120110FC00088E69 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FB39D2BF1200F3E600088E69 /* ShaderLang.h */; settings = {ATTRIBUTES = (Public, ); }; };
    631631/* End PBXBuildFile section */
     632
     633/* Begin PBXBuildRule section */
     634                53E934DB230609D800DE060C /* PBXBuildRule */ = {
     635                        isa = PBXBuildRule;
     636                        compilerSpec = com.apple.compilers.proxy.script;
     637                        filePatterns = "*.h";
     638                        fileType = pattern.proxy;
     639                        inputFiles = (
     640                        );
     641                        isEditable = 1;
     642                        name = "Files '*.h' using Script";
     643                        outputFiles = (
     644                                "$(HEADER_OUTPUT_DIR)/$(INPUT_FILE_NAME)",
     645                        );
     646                        script = "exec \"${SRCROOT}/adjust-angle-include-paths-rule\"\n";
     647                };
     648/* End PBXBuildRule section */
    632649
    633650/* Begin PBXCopyFilesBuildPhase section */
     
    26082625                        );
    26092626                        buildRules = (
     2627                                53E934DB230609D800DE060C /* PBXBuildRule */,
    26102628                        );
    26112629                        dependencies = (
     
    26602678                        runOnlyForDeploymentPostprocessing = 0;
    26612679                        shellPath = /bin/sh;
    2662                         shellScript = "/bin/sh $SRCROOT/adjust-angle-include-paths.sh\n";
     2680                        shellScript = "if [ \"${XCODE_VERSION_MAJOR}\" -ge \"1100\" -a \"${USE_NEW_BUILD_SYSTEM}\" = \"YES\" ]; then\n    exit 0\nfi\n\nexec \"$SRCROOT/adjust-angle-include-paths.sh\"\n";
    26632681                };
    26642682/* End PBXShellScriptBuildPhase section */
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r248444 r248813  
     12019-08-16  Keith Rollin  <krollin@apple.com>
     2
     3        Add XCBuild support to ANGLE
     4        https://bugs.webkit.org/show_bug.cgi?id=200836
     5        <rdar://problem/54410420>
     6
     7        Reviewed by Alex Christensen.
     8
     9        The ANGLE Xcode project contains two Build Phases: one that copies
     10        some headers, and another that modifies those headers. This
     11        combination does not work with XCBuild, which gets confused when it
     12        finds that headers that it's copied have been changed. When it detects
     13        this, XCBuild thinks that it should recopy those headers on the next
     14        build, causing their modification dates to change and for all
     15        dependent files to be rebuilt. This essentially turns an incremental
     16        rebuild into a full rebuild.
     17
     18        Address this problem by using a new facility in Xcode 11. This
     19        facility supports the copying and modifying headers files in a single
     20        step. It is achieved by first enabling the facility by setting
     21        APPLY_RULES_IN_COPY_HEADERS to YES. Next, we add a new Build Rule that
     22        invokes a custom script when the header files are copied. Third, we
     23        provide this script, which can essentially be a stripped down version
     24        of the one already used to modify the exported headers files. Finally,
     25        we disable the use of that old script when we are using Xcode 11. In
     26        this way, the old script that modifies the exported headers is used in
     27        Xcode 10, and the new facility is used in Xcode 11.
     28
     29        See also Bug 197340 for where this process was also applied to
     30        JavaScriptCore, WebKit, and WebKitLegacy.
     31
     32        * ANGLE.xcodeproj/project.pbxproj:
     33        * Configurations/ANGLE.xcconfig:
     34        * adjust-angle-include-paths-rule: Added.
     35
    1362019-08-08  Brent Fulgham  <bfulgham@apple.com>
    237
  • trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE.xcconfig

    r229646 r248813  
    99INSTALL_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/lib;
    1010PUBLIC_HEADERS_FOLDER_PATH = $(ANGLE_INSTALL_PATH_PREFIX)/usr/local/include/ANGLE;
     11APPLY_RULES_IN_COPY_HEADERS = $(USE_NEW_BUILD_SYSTEM);
Note: See TracChangeset for help on using the changeset viewer.