Commit a0bd8ef0 by Jamie Madill

Use ANGLE_TRANSLATOR_STATIC to enforce a static build of the translator in chromium.

This prevents strange warnings from defining COMPONENT_BUILD=0. Also rename COMPILER_IMPLEMENTATION to ANGLE_TRANSLATOR_IMPLEMENTATION for better consistency in chromium. ANGLEBUG=477 R=zmo@chromium.org BUG= Review URL: https://codereview.appspot.com/14294046
parent 384c0cd5
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
#ifndef _COMPILER_INTERFACE_INCLUDED_ #ifndef _COMPILER_INTERFACE_INCLUDED_
#define _COMPILER_INTERFACE_INCLUDED_ #define _COMPILER_INTERFACE_INCLUDED_
#if (COMPONENT_BUILD) #if defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC)
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
#if defined(COMPILER_IMPLEMENTATION) #if defined(ANGLE_TRANSLATOR_IMPLEMENTATION)
#define COMPILER_EXPORT __declspec(dllexport) #define COMPILER_EXPORT __declspec(dllexport)
#else #else
#define COMPILER_EXPORT __declspec(dllimport) #define COMPILER_EXPORT __declspec(dllimport)
#endif // defined(COMPILER_IMPLEMENTATION) #endif // defined(ANGLE_TRANSLATOR_IMPLEMENTATION)
#else // defined(WIN32) #else // defined(_WIN32) || defined(_WIN64)
#define COMPILER_EXPORT __attribute__((visibility("default"))) #define COMPILER_EXPORT __attribute__((visibility("default")))
#endif #endif
#else // defined(COMPONENT_BUILD) #else // defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC)
#define COMPILER_EXPORT #define COMPILER_EXPORT
#endif #endif
...@@ -146,14 +146,14 @@ typedef enum { ...@@ -146,14 +146,14 @@ typedef enum {
// This is needed only as a workaround for certain OpenGL driver bugs. // This is needed only as a workaround for certain OpenGL driver bugs.
SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100, SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100,
// This is an experimental flag to enforce restrictions that aim to prevent // This is an experimental flag to enforce restrictions that aim to prevent
// timing attacks. // timing attacks.
// It generates compilation errors for shaders that could expose sensitive // It generates compilation errors for shaders that could expose sensitive
// texture information via the timing channel. // texture information via the timing channel.
// To use this flag, you must compile the shader under the WebGL spec // To use this flag, you must compile the shader under the WebGL spec
// (using the SH_WEBGL_SPEC flag). // (using the SH_WEBGL_SPEC flag).
SH_TIMING_RESTRICTIONS = 0x0200, SH_TIMING_RESTRICTIONS = 0x0200,
// This flag prints the dependency graph that is used to enforce timing // This flag prints the dependency graph that is used to enforce timing
// restrictions on fragment shaders. // restrictions on fragment shaders.
// This flag only has an effect if all of the following are true: // This flag only has an effect if all of the following are true:
...@@ -267,7 +267,7 @@ COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources); ...@@ -267,7 +267,7 @@ COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources);
// //
// ShHandle held by but opaque to the driver. It is allocated, // ShHandle held by but opaque to the driver. It is allocated,
// managed, and de-allocated by the compiler. It's contents // managed, and de-allocated by the compiler. It's contents
// are defined by and used by the compiler. // are defined by and used by the compiler.
// //
// If handle creation fails, 0 will be returned. // If handle creation fails, 0 will be returned.
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
'../include', '../include',
], ],
'defines': [ 'defines': [
'COMPILER_IMPLEMENTATION', 'ANGLE_TRANSLATOR_IMPLEMENTATION',
], ],
'sources': ['<@(translator_sources)'], 'sources': ['<@(translator_sources)'],
# TODO(jschuh): http://crbug.com/167187 size_t -> int # TODO(jschuh): http://crbug.com/167187 size_t -> int
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
'../include', '../include',
], ],
'defines': [ 'defines': [
'COMPILER_IMPLEMENTATION', 'ANGLE_TRANSLATOR_IMPLEMENTATION',
], ],
'sources': ['<@(translator_sources)'], 'sources': ['<@(translator_sources)'],
# TODO(jschuh): http://crbug.com/167187 size_t -> int # TODO(jschuh): http://crbug.com/167187 size_t -> int
...@@ -214,8 +214,7 @@ ...@@ -214,8 +214,7 @@
'../include', '../include',
], ],
'defines': [ 'defines': [
'COMPILER_IMPLEMENTATION', 'ANGLE_TRANSLATOR_STATIC',
'COMPONENT_BUILD=0',
], ],
'sources': ['<@(translator_sources)'], 'sources': ['<@(translator_sources)'],
# TODO(jschuh): http://crbug.com/167187 size_t -> int # TODO(jschuh): http://crbug.com/167187 size_t -> int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment