From f86f275f65d110ac20124d3dcae213715c2a3520 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Tue, 20 Aug 2013 08:29:21 +0000 Subject: [PATCH] Add (mostly Chromium-compatible) V8_OS_* defines to v8.gyp. R=jkummerow@chromium.org, svenpanne@chromium.org Review URL: https://codereview.chromium.org/23283010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/gyp/v8.gyp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp index 66376c1..37417d5 100644 --- a/tools/gyp/v8.gyp +++ b/tools/gyp/v8.gyp @@ -687,6 +687,10 @@ }], ], }, + 'defines': [ + 'V8_OS_LINUX=1', + 'V8_OS_POSIX=1' + ], 'sources': [ ### gcmole(os:linux) ### '../../src/platform-linux.cc', '../../src/platform-posix.cc' @@ -704,16 +708,29 @@ ['host_os=="mac"', { 'target_conditions': [ ['_toolset=="host"', { + 'defines': [ + 'V8_OS_BSD=1', + 'V8_OS_MACOSX=1', + 'V8_OS_POSIX=1' + ], 'sources': [ '../../src/platform-macos.cc' ] }, { + 'defines': [ + 'V8_OS_LINUX=1', + 'V8_OS_POSIX=1' + ], 'sources': [ '../../src/platform-linux.cc' ] }], ], }, { + 'defines': [ + 'V8_OS_LINUX=1', + 'V8_OS_POSIX=1' + ], 'sources': [ '../../src/platform-linux.cc' ] @@ -722,6 +739,11 @@ }, ], ['OS=="freebsd"', { + 'defines': [ + 'V8_OS_BSD=1', + 'V8_OS_FREEBSD=1', + 'V8_OS_POSIX=1' + ], 'link_settings': { 'libraries': [ '-L/usr/local/lib -lexecinfo', @@ -733,6 +755,11 @@ } ], ['OS=="openbsd"', { + 'defines': [ + 'V8_OS_BSD=1', + 'V8_OS_OPENBSD=1', + 'V8_OS_POSIX=1' + ], 'link_settings': { 'libraries': [ '-L/usr/local/lib -lexecinfo', @@ -744,6 +771,11 @@ } ], ['OS=="netbsd"', { + 'defines': [ + 'V8_OS_BSD=1', + 'V8_OS_NETBSD=1', + 'V8_OS_POSIX=1' + ], 'link_settings': { 'libraries': [ '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo', @@ -755,6 +787,10 @@ } ], ['OS=="solaris"', { + 'defines': [ + 'V8_OS_POSIX=1', + 'V8_OS_SOLARIS=1' + ], 'link_settings': { 'libraries': [ '-lsocket -lnsl', @@ -766,6 +802,11 @@ } ], ['OS=="mac"', { + 'defines': [ + 'V8_OS_BSD=1', + 'V8_OS_MACOSX=1', + 'V8_OS_POSIX=1' + ], 'sources': [ '../../src/platform-macos.cc', '../../src/platform-posix.cc' @@ -782,11 +823,18 @@ }, 'conditions': [ ['build_env=="Cygwin"', { + 'defines': [ + 'V8_OS_CYGWIN=1', + 'V8_OS_POSIX=1' + ], 'sources': [ '../../src/platform-cygwin.cc', '../../src/platform-posix.cc', ], }, { + 'defines': [ + 'V8_OS_WIN=1' + ], 'sources': [ '../../src/platform-win32.cc', '../../src/win32-math.h', @@ -798,6 +846,9 @@ 'libraries': [ '-lwinmm', '-lws2_32' ], }, }, { + 'defines': [ + 'V8_OS_WIN=1' + ], 'sources': [ '../../src/platform-win32.cc', '../../src/win32-math.h', -- 2.7.4