mirror of
https://github.com/corda/corda.git
synced 2025-01-19 11:16:54 +00:00
look for %s@%d format symbols when resolving native methods on Windows, which obviates the need for -k flag to dlltool
This commit is contained in:
parent
e3a5c7e03f
commit
5c04c19e29
2
makefile
2
makefile
@ -371,7 +371,7 @@ $(executable): \
|
|||||||
@echo "linking $(@)"
|
@echo "linking $(@)"
|
||||||
ifeq ($(platform),windows)
|
ifeq ($(platform),windows)
|
||||||
$(dlltool) -z $(@).def $(^)
|
$(dlltool) -z $(@).def $(^)
|
||||||
$(dlltool) -k -d $(@).def -e $(@).exp
|
$(dlltool) -d $(@).def -e $(@).exp
|
||||||
$(cc) $(@).exp $(^) $(lflags) -o $(@)
|
$(cc) $(@).exp $(^) $(lflags) -o $(@)
|
||||||
else
|
else
|
||||||
$(cc) $(^) $(rdynamic) $(lflags) -o $(@)
|
$(cc) $(^) $(rdynamic) $(lflags) -o $(@)
|
||||||
|
@ -251,7 +251,7 @@ on Mac OS X:
|
|||||||
|
|
||||||
on Windows:
|
on Windows:
|
||||||
$ dlltool -z hello.def *.o
|
$ dlltool -z hello.def *.o
|
||||||
$ dlltool -k -d hello.def -e hello.exp
|
$ dlltool -d hello.def -e hello.exp
|
||||||
$ g++ hello.exp *.o -L../../win32/lib -lmingwthrd -lm -lz -lws2_32 \
|
$ g++ hello.exp *.o -L../../win32/lib -lmingwthrd -lm -lz -lws2_32 \
|
||||||
-mwindows -mconsole -o hello
|
-mwindows -mconsole -o hello
|
||||||
$ strip --strip-all hello.exe
|
$ strip --strip-all hello.exe
|
||||||
|
@ -167,8 +167,7 @@ resolveNativeMethod2(Thread* t, object method)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
// on windows, we also try the _%s@%d variant, since the SWT
|
// on windows, we also try the _%s@%d and %s@%d variants
|
||||||
// libraries use it.
|
|
||||||
unsigned footprint = methodParameterFootprint(t, method) + 1;
|
unsigned footprint = methodParameterFootprint(t, method) + 1;
|
||||||
if (methodFlags(t, method) & ACC_STATIC) {
|
if (methodFlags(t, method) & ACC_STATIC) {
|
||||||
++ footprint;
|
++ footprint;
|
||||||
@ -186,6 +185,12 @@ resolveNativeMethod2(Thread* t, object method)
|
|||||||
if (p) {
|
if (p) {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// one more try without the leading underscore
|
||||||
|
p = ::resolveNativeMethod(t, undecorated + 1, decorated + 1);
|
||||||
|
if (p) {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user