[Mac/GN] Re-do framework packaging to fix framework versioning.
Rather than trying to symlink as an action after producing the bundle, do it as an early-stage action. As part of this, mac_framework_bundle callers need to explicitly specify the top-level symlinks (framework_contents) that should be created. Frameworks are now packaged like so: 1. At `gn gen` time, an exec_script runs to write the framework_version to a file. If the previous value written does not match the new value, the entire framework output directory is clobbered. This must be done at gen-time to ensure nothing tries to clean the framework while also attempting to copy to it. 2. Also at `gn gen` time, a TOC file for the framework_contents is written. This allows the build to emulate depending on the presence of the top-level symlinks, since ninja does not stat symlinks correctly. https://github.com/ninja-build/ninja/issues/1186 3. The package_framework.py action now runs before the main create_bundle(). This action depends on the TOC file from (2) and will create all the required symlinks in the bundle. At the time this runs, the symlink target may not yet exist. 4. The create_bundle target is now always the leaf edge for mac_framework_bundle, and it copies all bundle contents to the fully versioned path (rather than through a symlink). This should resolve the issue of the build not stabilizing between specifying a framework_version and not. BUG=648757 Review-Url: https://codereview.chromium.org/2487763002 Cr-Commit-Position: refs/heads/master@{#430778}
Loading
Please register or sign in to comment