Fix appveyor windows build (#420)

* Fix msvcc dll build by adding dllexport decorations to all API declarations

* Fix appveyor build for VS 2013

Use the new -DFFI_BUILDING_DLL for producing a working DLL. Update the
msvcc.sh wrapper script to successfully compile the testsuite files.

* MSVC build: suppress warnings in testsuite

* fix testsuite on appveyor
This commit is contained in:
fwg
2018-04-02 13:55:31 +02:00
committed by Anthony Green
parent 48bdb02867
commit af6773d6ab
8 changed files with 138 additions and 52 deletions

View File

@@ -28,8 +28,8 @@ install:
$env:HOST="x86-pc-windows"
} Else {
$env:VCVARS_PLATFORM="amd64"
$env:BUILD="x86_64-pc-cygwin"
$env:HOST="x86_64-pc-winnt"
$env:BUILD="x86_64-w64-cygwin"
$env:HOST="x86_64-w64-cygwin"
}
- 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName setup.exe'
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu >NUL'
@@ -40,7 +40,9 @@ install:
build_script:
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh;)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='/cygdrive/c/projects/libffi/.travis/compile cl -nologo' CXX='/cygdrive/c/projects/libffi/.travis/compile cl -nologo' LD=link CPP='cl -nologo -EP' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST; cp src/x86/ffitarget.h include; make; find .; make check; cat `find ./ -name libffi.log`)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='/cygdrive/c/projects/libffi/msvcc.sh -m64' CXX='/cygdrive/c/projects/libffi/msvcc.sh -m64' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/x86/ffitarget.h include; make; find .;)"
- c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)"
# FIXME: "make check" currently fails. It just looks like msvcc needs
# to learn about -L and -l options. If you add "make check; cat `find