1# Copyright 2010 the V8 project authors. All rights reserved. 2# Redistribution and use in source and binary forms, with or without 3# modification, are permitted provided that the following conditions are 4# met: 5# 6# * Redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer. 8# * Redistributions in binary form must reproduce the above 9# copyright notice, this list of conditions and the following 10# disclaimer in the documentation and/or other materials provided 11# with the distribution. 12# * Neither the name of Google Inc. nor the names of its 13# contributors may be used to endorse or promote products derived 14# from this software without specific prior written permission. 15# 16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28{ 29 'variables': { 30 'library%': 'static_library', 31 'component%': 'static_library', 32 'visibility%': 'hidden', 33 'variables': { 34 'conditions': [ 35 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 36 # This handles the Linux platforms we generally deal with. Anything 37 # else gets passed through, which probably won't work very well; such 38 # hosts should pass an explicit target_arch to gyp. 39 'host_arch%': 40 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")', 41 }, { # OS!="linux" and OS!="freebsd" and OS!="openbsd" 42 'host_arch%': 'ia32', 43 }], 44 ], 45 }, 46 'host_arch%': '<(host_arch)', 47 'target_arch%': '<(host_arch)', 48 'v8_target_arch%': '<(target_arch)', 49 }, 50 'target_defaults': { 51 'default_configuration': 'Debug', 52 'configurations': { 53 'Debug': { 54 'cflags': [ '-g', '-O0' ], 55 'defines': [ 'ENABLE_DISASSEMBLER', 'DEBUG' ], 56 }, 57 'Release': { 58 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ], 59 }, 60 }, 61 }, 62 'conditions': [ 63 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 64 'target_defaults': { 65 'cflags': [ '-Wall', '-pthread', '-fno-rtti', '-fno-exceptions' ], 66 'ldflags': [ '-pthread', ], 67 'conditions': [ 68 [ 'target_arch=="ia32"', { 69 'cflags': [ '-m32' ], 70 'ldflags': [ '-m32' ], 71 }], 72 [ 'OS=="linux"', { 73 'cflags': [ '-ansi' ], 74 }], 75 [ 'visibility=="hidden"', { 76 'cflags': [ '-fvisibility=hidden' ], 77 }], 78 ], 79 }, 80 }], 81 ], 82} 83