MacOS build fix

Fixed MacOS build after the recent Linux fix caused an issue on
MacOS. Removed a few flags and changed visibility to fix it.

Change-Id: Ic9d08d8ec0ccf8a2002f2787c3ec79861bb59139
Reviewed-on: https://swiftshader-review.googlesource.com/8589
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 3665e71..b8f17d6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -73,10 +73,12 @@
       ]
     }
 
-    ldflags = [
-      "-Wl,--hash-style=both",
-      "-Wl,--gc-sections",
-    ]
+    if (is_linux) {
+      ldflags = [
+        "-Wl,--hash-style=both",
+        "-Wl,--gc-sections",
+      ]
+    }
   }
 }