Chromium Code Reviews| Index: third_party/protobuf/protobuf.gyp |
| diff --git a/third_party/protobuf/protobuf.gyp b/third_party/protobuf/protobuf.gyp |
| index b679cad20475cf147559e854bc43274aebfd91ce..cff81c864755a30f7cce617c381808dd5a7e8b26 100644 |
| --- a/third_party/protobuf/protobuf.gyp |
| +++ b/third_party/protobuf/protobuf.gyp |
| @@ -181,7 +181,19 @@ |
| 'GOOGLE_PROTOBUF_NO_RTTI', |
| 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', |
| ], |
| - |
| + # On Win component builds, we must dynamically link protobuf_lite to |
| + # avoid warning C4275: "non dll-interface class used as base for |
| + # dll-interface class". See the "DLLs vs. static linking" section in |
| + # third_party/protobuf/vsprojects/readme.txt. |
| + 'conditions': [ |
| + ['OS=="win" and component=="shared_library"', { |
| + 'defines': [ |
| + 'LIBPROTOBUF_EXPORTS', |
| + 'LIBPROTOC_EXPORTS', |
| + 'PROTOBUF_USE_DLLS', |
| + ], |
| + }], |
| + ], |
| 'direct_dependent_settings': { |
| 'include_dirs': [ |
| '<(config_h_dir)', |
| @@ -191,6 +203,19 @@ |
| 'GOOGLE_PROTOBUF_NO_RTTI', |
| 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', |
| ], |
| + # On Win component builds, we must dynamically link protobuf_lite to |
|
akalin
2012/12/13 02:04:50
it looks like the comment for the main define bloc
Raghu Simha
2012/12/13 20:07:49
Nice catch. I think it makes sense to delete the c
|
| + # avoid warning C4275: "non dll-interface class used as base for |
| + # dll-interface class". See the "DLLs vs. static linking" section in |
| + # third_party/protobuf/vsprojects/readme.txt. |
| + 'conditions': [ |
| + ['OS=="win" and component=="shared_library"', { |
| + 'defines': [ |
| + 'LIBPROTOBUF_EXPORTS', |
| + 'LIBPROTOC_EXPORTS', |
| + 'PROTOBUF_USE_DLLS', |
| + ], |
| + }], |
| + ], |
| }, |
| }, |
| # This is the full, heavy protobuf lib that's needed for c++ .proto's |