Prevent LTO from eliminating cross-library virtual methods.

libEGL has to call virtual methods on objects created withing libGLESv2,
and vice-versa. Clang's aggressive link-time-optimization considers
calls to these methods unreachable, because they're not defined within
the same linkage unit. So when they do get called, we're hitting UD
instructions. It can be fixed by marking these classes with
[[clang::lto_visibility_public]] attributes:
https://clang.llvm.org/docs/LTOVisibility.html

Bug chromium:720933

Change-Id: I87f9b09921a1b2d443121efcdb5525ff4cb5797b
Reviewed-on: https://swiftshader-review.googlesource.com/9688
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLESv2/libGLESv2.vcxproj b/src/OpenGL/libGLESv2/libGLESv2.vcxproj
index 767c43e..5750080 100644
--- a/src/OpenGL/libGLESv2/libGLESv2.vcxproj
+++ b/src/OpenGL/libGLESv2/libGLESv2.vcxproj
@@ -135,7 +135,7 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

       <BrowseInformation>true</BrowseInformation>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

     </ClCompile>

     <Link>

@@ -165,7 +165,7 @@
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

       <BrowseInformation>true</BrowseInformation>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

     </ClCompile>

     <Link>

@@ -202,7 +202,7 @@
       <WholeProgramOptimization>true</WholeProgramOptimization>

       <IntrinsicFunctions>false</IntrinsicFunctions>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

     </ClCompile>

     <Link>

@@ -240,7 +240,7 @@
       <WholeProgramOptimization>true</WholeProgramOptimization>

       <IntrinsicFunctions>false</IntrinsicFunctions>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

     </ClCompile>

     <Link>

@@ -279,7 +279,7 @@
       <WholeProgramOptimization>true</WholeProgramOptimization>

       <IntrinsicFunctions>false</IntrinsicFunctions>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

     </ClCompile>

     <Link>

       <AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>

@@ -315,7 +315,7 @@
       <WholeProgramOptimization>true</WholeProgramOptimization>

       <IntrinsicFunctions>false</IntrinsicFunctions>

       <TreatWarningAsError>true</TreatWarningAsError>

-      <DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>

+      <DisableSpecificWarnings>5030;%(DisableSpecificWarnings)</DisableSpecificWarnings>

     </ClCompile>

     <Link>

       <AdditionalDependencies>dxguid.lib;WS2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>