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

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

Issue 2326543003: Add missing linker flags to allow use of custom frameworks on iOS. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/rules.gni
diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni
index 746d81231da21ba73710ffc87da87b0051d1bce3..8d1c16283e052af488e5e086b800b59f72c51502 100644
--- a/build/config/ios/rules.gni
+++ b/build/config/ios/rules.gni
@@ -439,6 +439,20 @@ template("ios_app_bundle") {
}
libs += [ "UIKit.framework" ]
+ if (!defined(ldflags)) {
+ ldflags = []
+ }
+ ldflags += [
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/Frameworks",
+ "-Xlinker",
+ "-objc_abi_version",
+ "-Xlinker",
+ "2",
+ ]
+
if (use_ios_simulator) {
deps += [ ":$_generate_entitlements_target($default_toolchain)" ]
@@ -865,7 +879,6 @@ template("ios_framework_bundle") {
_framework_headers_target = _target_name + "_framework_headers"
_framework_headers_config = _target_name + "_framework_headers_config"
_headers_map_config = _target_name + "_headers_map"
- _install_name_config = _target_name + "_install_name"
}
_arch_shared_library_source = _target_name + "_arch_shared_library_sources"
@@ -925,7 +938,20 @@ template("ios_framework_bundle") {
deps = []
}
deps += [ ":$_arch_shared_library_source" ]
- configs += [ ":$_install_name_config($default_toolchain)" ]
+
+ if (!defined(ldflags)) {
+ ldflags = []
+ }
+ ldflags += [
+ "-Xlinker",
+ "-install_name",
+ "-Xlinker",
+ "@rpath/$_output_name.framework/$_output_name",
+ "-Xlinker",
+ "-objc_abi_version",
+ "-Xlinker",
+ "2",
+ ]
output_extension = ""
output_name = _output_name
@@ -1022,14 +1048,6 @@ template("ios_framework_bundle") {
include_dirs = [ _header_map_filename ]
}
- config(_install_name_config) {
- visibility = [ ":$_target_name" ]
- ldflags = [
- "-install_name",
- "@rpath/$_output_name.framework/$_output_name",
- ]
- }
-
group(_framework_headers_target) {
deps = [
":$_compile_headers_map_target",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698