OSDN Git Service

MacOS build fix
[android-x86/external-swiftshader.git] / src / OpenGL / libGLESv2 / BUILD.gn
index 80adf83..8b0024a 100644 (file)
@@ -36,10 +36,15 @@ config("swiftshader_libGLESv2_private_config") {
       "-D__STDC_CONSTANT_MACROS",
       "-D__STDC_LIMIT_MACROS",
       "-DGL_API=",
-      "-DGL_APICALL=__attribute__((visibility(\"protected\")))",
       "-DGL_GLEXT_PROTOTYPES",
       "-Wno-sign-compare",
     ]
+
+    if (is_linux) {
+      cflags += [ "-DGL_APICALL=__attribute__((visibility(\"protected\")))" ]
+    } else {
+      cflags += [ "-DGL_APICALL=__attribute__((visibility(\"default\")))" ]
+    }
   }
 }