Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
c0ee4d2e
Commit
c0ee4d2e
authored
Dec 22, 2009
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build DLLs on Cygwin and MinGW.
parent
94fd2ad7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
8 deletions
+42
-8
CHANGES.txt
CHANGES.txt
+2
-0
Makefile.am
src/Makefile.am
+3
-3
command_line_interface_unittest.cc
...ogle/protobuf/compiler/command_line_interface_unittest.cc
+37
-5
No files found.
CHANGES.txt
View file @
c0ee4d2e
...
...
@@ -30,6 +30,8 @@
UTF-8 bytes.
* Compiled-in message types can now contain dynamic extensions, through use
of CodedInputStream::SetExtensionRegistry().
* Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
match other platforms. Use --disable-shared to avoid this.
Java
* parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
...
...
src/Makefile.am
View file @
c0ee4d2e
...
...
@@ -76,7 +76,7 @@ nobase_include_HEADERS = \
lib_LTLIBRARIES
=
libprotobuf-lite.la libprotobuf.la libprotoc.la
libprotobuf_lite_la_LIBADD
=
$(PTHREAD_LIBS)
libprotobuf_lite_la_LDFLAGS
=
-version-info
6:0:0
libprotobuf_lite_la_LDFLAGS
=
-version-info
6:0:0
-export-dynamic
-no-undefined
libprotobuf_lite_la_SOURCES
=
\
google/protobuf/stubs/common.cc
\
google/protobuf/stubs/once.cc
\
...
...
@@ -95,7 +95,7 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/io/zero_copy_stream_impl_lite.cc
libprotobuf_la_LIBADD
=
$(PTHREAD_LIBS)
libprotobuf_la_LDFLAGS
=
-version-info
6:0:0
libprotobuf_la_LDFLAGS
=
-version-info
6:0:0
-export-dynamic
-no-undefined
libprotobuf_la_SOURCES
=
\
$(libprotobuf_lite_la_SOURCES)
\
google/protobuf/stubs/strutil.cc
\
...
...
@@ -123,7 +123,7 @@ libprotobuf_la_SOURCES = \
google/protobuf/compiler/parser.cc
libprotoc_la_LIBADD
=
$(PTHREAD_LIBS)
libprotobuf.la
libprotoc_la_LDFLAGS
=
-version-info
6:0:0
libprotoc_la_LDFLAGS
=
-version-info
6:0:0
-export-dynamic
-no-undefined
libprotoc_la_SOURCES
=
\
google/protobuf/compiler/code_generator.cc
\
google/protobuf/compiler/command_line_interface.cc
\
...
...
src/google/protobuf/compiler/command_line_interface_unittest.cc
View file @
c0ee4d2e
...
...
@@ -68,6 +68,9 @@ namespace compiler {
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif
#ifndef F_OK
#define F_OK 00 // not defined by MSVC for whatever reason
#endif
#endif
namespace
{
...
...
@@ -248,11 +251,40 @@ void CommandLineInterfaceTest::Run(const string& command) {
if
(
!
disallow_plugins_
)
{
cli_
.
AllowPlugins
(
"prefix-"
);
#ifdef _WIN32
args
.
push_back
(
"--plugin=prefix-gen-plug=test_plugin.exe"
);
#else
args
.
push_back
(
"--plugin=prefix-gen-plug=test_plugin"
);
#endif
const
char
*
possible_paths
[]
=
{
// When building with shared libraries, libtool hides the real executable
// in .libs and puts a fake wrapper in the current directory.
// Unfortunately, due to an apparent bug on Cygwin/MinGW, if one program
// wrapped in this way (e.g. protobuf-tests.exe) tries to execute another
// program wrapped in this way (e.g. test_plugin.exe), the latter fails
// with error code 127 and no explanation message. Presumably the problem
// is that the wrapper for protobuf-tests.exe set some environment
// variables that confuse the wrapper for test_plugin.exe. Luckily, it
// turns out that if we simply invoke the wrapped test_plugin.exe
// directly, it works -- I guess the environment variables set by the
// protobuf-tests.exe wrapper happen to be correct for it too. So we do
// that.
".libs/test_plugin.exe"
,
// Win32 w/autotool (Cygwin / MinGW)
"test_plugin.exe"
,
// Other Win32 (MSVC)
"test_plugin"
,
// Unix
};
string
plugin_path
;
for
(
int
i
=
0
;
i
<
GOOGLE_ARRAYSIZE
(
possible_paths
);
i
++
)
{
if
(
access
(
possible_paths
[
i
],
F_OK
)
==
0
)
{
plugin_path
=
possible_paths
[
i
];
break
;
}
}
if
(
plugin_path
.
empty
())
{
GOOGLE_LOG
(
ERROR
)
<<
"Plugin executable not found. Plugin tests are likely to fail."
;
}
else
{
args
.
push_back
(
"--plugin=prefix-gen-plug="
+
plugin_path
);
}
}
scoped_array
<
const
char
*>
argv
(
new
const
char
*
[
args
.
size
()]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment