@@ -497,16 +497,17 @@ source_set("electron_lib") {
497
497
} else {
498
498
libs += [
499
499
" Squirrel.framework" ,
500
- " ReactiveCocoa .framework" ,
500
+ " ReactiveObjC .framework" ,
501
501
" Mantle.framework" ,
502
502
]
503
- cflags_objcc = [
504
- " -F" ,
505
- rebase_path (" external_binaries" , root_build_dir ),
503
+
504
+ deps += [
505
+ " //third_party/squirrel.mac:reactiveobjc_framework+link" ,
506
+ " //third_party/squirrel.mac:squirrel_framework+link" ,
506
507
]
507
508
508
- # ReactiveCocoa which is used by Squirrel requires using __weak.
509
- cflags_objcc + = [ " -fobjc-weak" ]
509
+ # ReactiveObjC which is used by Squirrel requires using __weak.
510
+ cflags_objcc = [ " -fobjc-weak" ]
510
511
}
511
512
}
512
513
if (is_linux ) {
@@ -811,8 +812,6 @@ if (is_mac) {
811
812
}
812
813
813
814
ldflags = [
814
- " -F" ,
815
- rebase_path (" external_binaries" , root_build_dir ),
816
815
" -Wl,-install_name,@rpath/$output_name .framework/$output_name " ,
817
816
" -rpath" ,
818
817
" @loader_path/Libraries" ,
@@ -863,17 +862,49 @@ if (is_mac) {
863
862
}
864
863
}
865
864
865
+ template (" stripped_framework" ) {
866
+ action (target_name ) {
867
+ assert (defined (invoker .framework ))
868
+
869
+ script = " //electron/build/strip_framework.py"
870
+
871
+ forward_variables_from (invoker , [ " deps" ])
872
+ inputs = [ " $root_out_dir /" + invoker .framework ]
873
+ outputs = [ " $target_out_dir /stripped_frameworks/" + invoker .framework ]
874
+
875
+ args = rebase_path (inputs ) + rebase_path (outputs )
876
+ }
877
+ }
878
+
879
+ stripped_framework (" stripped_mantle_framework" ) {
880
+ framework = " Mantle.framework"
881
+ deps = [ " //third_party/squirrel.mac:mantle_framework" ]
882
+ }
883
+
884
+ stripped_framework (" stripped_reactiveobjc_framework" ) {
885
+ framework = " ReactiveObjC.framework"
886
+ deps = [ " //third_party/squirrel.mac:reactiveobjc_framework" ]
887
+ }
888
+
889
+ stripped_framework (" stripped_squirrel_framework" ) {
890
+ framework = " Squirrel.framework"
891
+ deps = [ " //third_party/squirrel.mac:squirrel_framework" ]
892
+ }
893
+
866
894
bundle_data (" electron_app_framework_bundle_data" ) {
867
895
sources = [ " $root_out_dir /$electron_framework_name .framework" ]
868
896
if (! is_mas_build ) {
869
- sources += [
870
- " external_binaries/Mantle.framework" ,
871
- " external_binaries/ReactiveCocoa.framework" ,
872
- " external_binaries/Squirrel.framework" ,
873
- ]
897
+ sources += get_target_outputs (" :stripped_mantle_framework" ) +
898
+ get_target_outputs (" :stripped_reactiveobjc_framework" ) +
899
+ get_target_outputs (" :stripped_squirrel_framework" )
874
900
}
875
901
outputs = [ " {{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
876
- public_deps = [ " :electron_framework+link" ]
902
+ public_deps = [
903
+ " :electron_framework+link" ,
904
+ " :stripped_mantle_framework" ,
905
+ " :stripped_reactiveobjc_framework" ,
906
+ " :stripped_squirrel_framework" ,
907
+ ]
877
908
878
909
foreach (helper_params , content_mac_helpers ) {
879
910
sources +=
@@ -1179,18 +1210,6 @@ test("shell_browser_ui_unittests") {
1179
1210
" //ui/base" ,
1180
1211
" //ui/strings" ,
1181
1212
]
1182
-
1183
- if (is_mac ) {
1184
- # Resolve paths owing to different test executable locations
1185
- ldflags = [
1186
- " -F" ,
1187
- rebase_path (" external_binaries" , root_build_dir ),
1188
- " -rpath" ,
1189
- " @loader_path" ,
1190
- " -rpath" ,
1191
- " @executable_path/" + rebase_path (" external_binaries" , root_build_dir ),
1192
- ]
1193
- }
1194
1213
}
1195
1214
1196
1215
template (" dist_zip" ) {
0 commit comments