Added dynamic linking build for Appveyor (#8948)

* Revert "Enable GDB for Windows (#8877)"
Because it does not work while linking dynamically on windows
This reverts commit 12b9d8c3b47f470e11030f97544c864ae54d7e98.
* Added dynamic linking build for Appveyor
* Try cleaning Windows linkage (meson)
This commit is contained in:
xarkes 2017-12-03 21:26:13 +01:00 committed by GitHub
parent 7e5c635e08
commit 410ca09803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 16 deletions

View File

@ -33,6 +33,11 @@ environment:
PYTHON: 'C:\\Python36'
BUILD_DIR: build
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip
# VS2015 64 (Dynamic linking)
- builder: vs2015_64_dyn
PYTHON: 'C:\\Python36'
BUILD_DIR: build
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip
# MINGW32 Variables
#- builder: mingw32
# EXP_PATH: '/c/mingw/bin:/c/mingw/msys/1.0/bin:/c/Program\ Files\ \(x86\)/Git/bin'
@ -72,6 +77,8 @@ build_script:
- cmd: if %builder% == vs2015_32 ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 && meson.bat --release --msbuild --xp && sys\meson_install.bat --msbuild %DIST_FOLDER% && zip -r %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == vs2015_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && meson.bat --release --shared && sys\meson_install.bat %DIST_FOLDER% && zip -r %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == mingw32 ( set "PATH=%EXP_PATH%;%PATH%" && sh -c "CC=mingw32-gcc-5.3.0 ./configure --with-ostype=mingw32 && make" && sh -c "make windist WINBITS=%builder% ZIPNAME=%ARTIFACT_ZIP%" )
- cmd: if %builder% == msys2 ( set && set PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;"%PATH%" && echo "%PATH%" && sh.exe -c "export PATH=${PATH}:/mingw64/bin; ./configure --build=i686-unknown-windows-gnu ; mingw32-make -j1 ; mingw32-make windist WINBITS=%builder%" )

View File

@ -73,5 +73,6 @@ r_core = library('r_core', files,
libr2spp.extract_all_objects(),
libr2gdb.extract_all_objects(),
],
dependencies: [platform_deps],
install: true
)

View File

@ -9,7 +9,7 @@ files=[
'p/debug_bf.c',
#'p/debug_bochs.c',
'p/debug_esil.c',
'p/debug_gdb.c',
#'p/debug_gdb.c',
'p/debug_io.c',
'p/debug_native.c',
#'p/debug_qnx.c',
@ -56,7 +56,6 @@ endif
r_debug = library('r_debug', files,
include_directories: [platform_inc, include_directories([
'../bin/format/elf',
'../../shlr/gdb/include',
'../../shlr/windbg'
])],
c_args : ['-DCORELIB=1', '-I' + meson.current_build_dir() + '/../..'],

View File

@ -124,11 +124,7 @@ static RList *r_debug_gdb_map_get(RDebug* dbg) { //TODO
ut64 buflen = 16384;
// If /proc/%d/maps is not valid for gdbserver, we return NULL, as of now
snprintf (path, sizeof (path) - 1, "/proc/%d/maps", desc->pid);
#ifdef _MSC_VER
if (gdbr_open_file (desc, path, O_RDONLY, _S_IREAD | _S_IWRITE) < 0) {
#else
if (gdbr_open_file (desc, path, O_RDONLY, S_IRUSR | S_IWUSR | S_IXUSR) < 0) {
#endif
return NULL;
}
if (!(buf = malloc (buflen))) {

View File

@ -107,9 +107,6 @@
/* Must be included before windows.h */
#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#else
/* Deprecated */
//#include <winsock.h>
#endif
typedef int socklen_t;
#undef USE_SOCKETS

View File

@ -167,7 +167,6 @@ crypto = [
debug = [
'bf',
'esil',
'gdb',
'io',
'native',
'rap',
@ -203,7 +202,6 @@ io = [
'bfdbg',
'debug',
'default',
'gdb',
'gzip',
'http',
'ihex',

View File

@ -11,7 +11,7 @@ files=[
r_socket = library('r_socket', files,
include_directories: [platform_inc],
dependencies: [utl],
dependencies: [utl, platform_deps],
link_with: [r_util],
c_args : '-DCORELIB=1',
install: true

View File

@ -13,9 +13,6 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef _MSC_VER
#pragma comment(lib, "ws2_32.lib")
#endif
#if EMSCRIPTEN
#define NETWORK_DISABLED 1

View File

@ -61,9 +61,10 @@ else
host_os = 'darwin'
endif
platform_deps = []
platform_inc = include_directories(['.','../libr/include'])
if host_machine.system() == 'windows'
#platform_deps = [cc.find_library('ws2_32')]
platform_deps = [cc.find_library('ws2_32')]
platform_inc = include_directories(['.','../libr/include','../libr/include/msvc'])
host_os = 'windows'
if get_option('default_library') == 'static'