Revert "Switch GN defs on Mac and iOS to use frameworks instead of libs."

This reverts commit c61e35dbc6664fb71e93210385e64f9774e37ad6.

Reason for revert: Breaking builds

Original change's description:
> Switch GN defs on Mac and iOS to use frameworks instead of libs.
> 
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
> 
> Change-Id: I67b118457721975ac2408308438d71172be66592
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,jvanverth@google.com

Change-Id: I7b81a92a67181e08ee57bcb184768794281cd37a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300228
Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 486d75c..a82555e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -454,7 +454,7 @@
   ]
 
   if (is_mac) {
-    frameworks = [
+    libs = [
       # AppKit symbols NSFontWeightXXX may be dlsym'ed.
       "AppKit.framework",
       "ApplicationServices.framework",
@@ -462,7 +462,7 @@
   }
 
   if (is_ios) {
-    frameworks = [
+    libs = [
       "CoreFoundation.framework",
       "CoreGraphics.framework",
       "CoreText.framework",
@@ -637,7 +637,6 @@
   }
 
   libs = []
-  frameworks = []
 
   if (skia_use_gl) {
     public_defines += [ "SK_GL" ]
@@ -710,7 +709,7 @@
         "d3dcompiler.lib",
       ]
     } else if (dawn_enable_metal) {
-      frameworks += [ "Metal.framework" ]
+      libs += [ "Metal.framework" ]
     }
   }
 
@@ -732,9 +731,9 @@
   if (skia_use_metal) {
     public_defines += [ "SK_METAL" ]
     sources += skia_metal_sources
-    frameworks += [ "Metal.framework" ]
-    frameworks += [ "MetalKit.framework" ]
-    frameworks += [ "Foundation.framework" ]
+    libs += [ "Metal.framework" ]
+    libs += [ "MetalKit.framework" ]
+    libs += [ "Foundation.framework" ]
     cflags_objcc += [ "-fobjc-arc" ]
   }
 
@@ -1082,7 +1081,6 @@
 
   defines = []
   libs = []
-  frameworks = []
 
   if (is_win) {
     sources += [
@@ -1133,7 +1131,7 @@
       "src/ports/SkImageEncoder_CG.cpp",
       "src/ports/SkImageGeneratorCG.cpp",
     ]
-    frameworks += [
+    libs += [
       "ApplicationServices.framework",
       "OpenGL.framework",
     ]
@@ -1145,7 +1143,7 @@
       "src/ports/SkImageEncoder_CG.cpp",
       "src/ports/SkImageGeneratorCG.cpp",
     ]
-    frameworks += [
+    libs += [
       "CoreFoundation.framework",
       "ImageIO.framework",
       "MobileCoreServices.framework",
@@ -1473,14 +1471,13 @@
     ]
 
     libs = []
-    frameworks = []
 
     if (skia_use_gl) {
       sources +=
           [ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp" ]
       if (is_ios) {
         sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
-        frameworks += [ "OpenGLES.framework" ]
+        libs += [ "OpenGLES.framework" ]
       } else if (is_mac) {
         sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
       }
@@ -1615,18 +1612,17 @@
       sources += [ "tools/CrashHandler.cpp" ]
     }
     libs = []
-    frameworks = []
     if (is_ios) {
       sources += [ "tools/ios_utils.m" ]
       sources += [ "tools/ios_utils.h" ]
       if (skia_use_metal) {
         sources += [ "tools/AutoreleasePool.mm" ]
       }
-      frameworks += [ "Foundation.framework" ]
+      libs += [ "Foundation.framework" ]
     } else if (is_mac) {
       if (skia_use_metal) {
         sources += [ "tools/AutoreleasePool.mm" ]
-        frameworks += [ "Foundation.framework" ]
+        libs += [ "Foundation.framework" ]
       }
     } else if (is_win) {
       libs += [ "DbgHelp.lib" ]
@@ -2253,7 +2249,6 @@
       "tools/sk_app/WindowContext.h",
     ]
     libs = []
-    frameworks = []
 
     if (is_android) {
       sources += [
@@ -2296,7 +2291,7 @@
         "tools/sk_app/mac/Window_mac.mm",
         "tools/sk_app/mac/main_mac.mm",
       ]
-      frameworks += [
+      libs += [
         "QuartzCore.framework",
         "Cocoa.framework",
         "Foundation.framework",
@@ -2309,7 +2304,7 @@
         "tools/sk_app/ios/Window_ios.mm",
         "tools/sk_app/ios/main_ios.mm",
       ]
-      frameworks += [ "QuartzCore.framework" ]
+      libs += [ "QuartzCore.framework" ]
     }
 
     if (skia_use_gl) {
diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn
index 0465686..4517710 100644
--- a/gn/toolchain/BUILD.gn
+++ b/gn/toolchain/BUILD.gn
@@ -234,7 +234,7 @@
 
     tool("objc") {
       depfile = "{{output}}.d"
-      command = "$cc_wrapper $cc -MD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}"
+      command = "$cc_wrapper $cc -MD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       outputs =
           [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ]
@@ -243,7 +243,7 @@
 
     tool("objcxx") {
       depfile = "{{output}}.d"
-      command = "$cc_wrapper $cxx -MD -MF $depfile {{defines}} {{include_dirs}} {{framework_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}"
+      command = "$cc_wrapper $cxx -MD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}"
       depsformat = "gcc"
       outputs =
           [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ]
@@ -304,7 +304,7 @@
         _end_group = ""
       }
 
-      command = "$cxx -shared {{ldflags}} $_start_group @$rspfile {{solibs}} $_end_group {{frameworks}} {{libs}} $rpath -o {{output}}"
+      command = "$cxx -shared {{ldflags}} $_start_group @$rspfile {{solibs}} $_end_group {{libs}} $rpath -o {{output}}"
       outputs = [ "{{root_out_dir}}/$soname" ]
       output_prefix = "lib"
       default_output_extension = ".so"
@@ -328,7 +328,7 @@
         _start_group = ""
         _end_group = ""
       }
-      command = "$cxx {{ldflags}} $_start_group @$rspfile {{solibs}} $_end_group {{frameworks}} {{libs}} -o $exe_name"
+      command = "$cxx {{ldflags}} $_start_group @$rspfile {{solibs}} $_end_group {{libs}} -o $exe_name"
 
       outputs = [ "$exe_name" ]
       description = "link {{output}}"