Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: build/config/mac/rules.gni

Issue 2453043002: [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle. (Closed)
Patch Set: Re-land Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/mac/prepare_framework_version.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/rules.gni
diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni
index c10cc4b7f940dbefbba18126ee5e8454eca43d77..81297eb9a3d396bd5d7c5e2debfcab2cb87bf811 100644
--- a/build/config/mac/rules.gni
+++ b/build/config/mac/rules.gni
@@ -258,11 +258,13 @@ template("mac_framework_bundle") {
# the versioned directory structure.
_framework_target = _target_name
_framework_name = _output_name + ".framework"
- _framework_root_dir = "$root_out_dir/$_framework_name"
+ _framework_base_dir = "$root_out_dir/$_framework_name"
if (defined(invoker.framework_version) && invoker.framework_version != "") {
_framework_version = invoker.framework_version
- _framework_root_dir += "/Versions/$_framework_version"
+ _framework_root_dir = _framework_base_dir + "/Versions/$_framework_version"
_framework_target = _target_name + "_create_bundle"
+ } else {
+ _framework_root_dir = _framework_base_dir
}
_link_shared_library_target = target_name + "_shared_library"
@@ -302,6 +304,19 @@ template("mac_framework_bundle") {
]
}
+ # Clean the entire framework if the framework_version changes.
+ _version_arg = ""
+ if (defined(_framework_version)) {
+ _version_arg = _framework_version
+ }
+ _version_file = "$target_out_dir/${target_name}_version"
+ exec_script("//build/config/mac/prepare_framework_version.py",
+ [
+ rebase_path(_version_file),
+ rebase_path(_framework_base_dir),
+ "'$_version_arg'",
+ ])
+
_framework_public_config = _target_name + "_public_config"
config(_framework_public_config) {
# TODO(sdefresne): should we have a framework_dirs similar to lib_dirs
« no previous file with comments | « build/config/mac/prepare_framework_version.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698