Skip to content

Commit

Permalink
build ios
Browse files Browse the repository at this point in the history
  • Loading branch information
t3rr0r committed Feb 27, 2018
1 parent 651622b commit 5cc1c2d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deps/leveldb/leveldb-1.20/port/port_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define STORAGE_LEVELDB_PORT_PORT_POSIX_H_

#undef PLATFORM_IS_LITTLE_ENDIAN
#if defined(OS_MACOSX)
#if defined(OS_MACOSX) || defined(OS_IOS)
#include <machine/endian.h>
#if defined(__DARWIN_LITTLE_ENDIAN) && defined(__DARWIN_BYTE_ORDER)
#define PLATFORM_IS_LITTLE_ENDIAN \
Expand Down Expand Up @@ -52,14 +52,15 @@

#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN)
defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN) ||\
defined(OS_IOS)
// Use fread/fwrite/fflush on platforms without _unlocked variants
#define fread_unlocked fread
#define fwrite_unlocked fwrite
#define fflush_unlocked fflush
#endif

#if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_IOS) ||\
defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
// Use fsync() on platforms without fdatasync()
#define fdatasync fsync
Expand Down
14 changes: 14 additions & 0 deletions deps/leveldb/leveldb.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@
'-pthread'
]
}]
, ['OS == "ios"', {
'defines': [
'OS_IOS=1'
]
, 'libraries': []
, 'ccflags': []
, 'xcode_settings': {
'WARNING_CFLAGS': [
'-Wno-sign-compare'
, '-Wno-unused-variable'
, '-Wno-unused-function'
]
}
}]
, ['OS == "mac"', {
'defines': [
'OS_MACOSX=1'
Expand Down
1 change: 1 addition & 0 deletions deps/snappy/snappy.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
['OS=="linux"', {'os_include': 'linux'}]
, ['OS=="android"', {'os_include': 'linux'}]
, ['OS=="mac"', {'os_include': 'mac'}]
, ['OS=="ios"', {'os_include': 'mac'}]
, ['OS=="solaris"', {'os_include': 'solaris'}]
, ['OS=="win"', {'os_include': 'win32'}]
, ['OS=="freebsd"', {'os_include': 'freebsd'}]
Expand Down

0 comments on commit 5cc1c2d

Please sign in to comment.