Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 206 lines (203 sloc) 7.158 kb
25a5e90 @ry Fix GYP build on OSX
ry authored
1 {
2 'variables': {
30b29d8 @bnoordhuis build: disable -fstrict-aliasing if gcc < 4.6.0
bnoordhuis authored
3 'strict_aliasing%': 'false', # turn on/off -fstrict-aliasing
b433c42 @ry gyp: Support Linux
ry authored
4 'visibility%': 'hidden', # V8's visibility setting
25a5e90 @ry Fix GYP build on OSX
ry authored
5 'target_arch%': 'ia32', # set v8's target architecture
6 'host_arch%': 'ia32', # set v8's host architecture
c65a91c @ry GYP: don't build V8 twice
ry authored
7 'want_separate_host_toolset': 0, # V8 should not build target and host
25a5e90 @ry Fix GYP build on OSX
ry authored
8 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
9 'component%': 'static_library', # NB. these names match with what V8 expects
10 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
930fabe @piscisaureus Disable V8 postmortem debugging on Windows
piscisaureus authored
11
12 # Enable V8's post-mortem debugging only on unix flavors.
13 'conditions': [
14 ['OS != "win"', {
15 'v8_postmortem_support': 'true'
16 }]
17 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
18 },
19
20 'target_defaults': {
491ec17 @shigeki build: change default BUILDTYPE of gyp to Release
shigeki authored
21 'default_configuration': 'Release',
25a5e90 @ry Fix GYP build on OSX
ry authored
22 'configurations': {
23 'Debug': {
24 'defines': [ 'DEBUG', '_DEBUG' ],
25 'cflags': [ '-g', '-O0' ],
0a34755 enable x64 windows build
Igor Zinkovsky authored
26 'conditions': [
27 ['target_arch=="x64"', {
28 'msvs_configuration_platform': 'x64',
29 }],
30 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
31 'msvs_settings': {
32 'VCCLCompilerTool': {
71e9756 @TooTallNate Default to static linking CRT on Windows.
TooTallNate authored
33 'RuntimeLibrary': 1, # static debug
25a5e90 @ry Fix GYP build on OSX
ry authored
34 'Optimization': 0, # /Od, no optimization
51e66ec @piscisaureus Windows: turn off /Gm
piscisaureus authored
35 'MinimalRebuild': 'false',
25a5e90 @ry Fix GYP build on OSX
ry authored
36 'OmitFramePointers': 'false',
37 'BasicRuntimeChecks': 3, # /RTC1
38 },
39 'VCLinkerTool': {
40 'LinkIncremental': 2, # enable incremental linking
41 },
42 },
43 },
44 'Release': {
30b29d8 @bnoordhuis build: disable -fstrict-aliasing if gcc < 4.6.0
bnoordhuis authored
45 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
7864bb9 @davepacheco build: disable -fomit-frame-pointer on solaris
davepacheco authored
46 'conditions': [
0a34755 enable x64 windows build
Igor Zinkovsky authored
47 ['target_arch=="x64"', {
48 'msvs_configuration_platform': 'x64',
49 }],
30b29d8 @bnoordhuis build: disable -fstrict-aliasing if gcc < 4.6.0
bnoordhuis authored
50 ['OS=="solaris"', {
51 'cflags': [ '-fno-omit-frame-pointer' ],
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
52 # pull in V8's postmortem metadata
53 'ldflags': [ '-Wl,-z,allextract' ]
30b29d8 @bnoordhuis build: disable -fstrict-aliasing if gcc < 4.6.0
bnoordhuis authored
54 }],
55 ['strict_aliasing!="true"', {
56 'cflags': [ '-fno-strict-aliasing' ],
57 }],
0a34755 enable x64 windows build
Igor Zinkovsky authored
58 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
59 'msvs_settings': {
60 'VCCLCompilerTool': {
71e9756 @TooTallNate Default to static linking CRT on Windows.
TooTallNate authored
61 'RuntimeLibrary': 0, # static release
25a5e90 @ry Fix GYP build on OSX
ry authored
62 'Optimization': 3, # /Ox, full optimization
63 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
64 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
65 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
66 'OmitFramePointers': 'true',
67 'EnableFunctionLevelLinking': 'true',
68 'EnableIntrinsicFunctions': 'true',
2e2df04 @piscisaureus Windows: disable RTTI and exceptions
piscisaureus authored
69 'RuntimeTypeInfo': 'false',
70 'ExceptionHandling': '0',
25a5e90 @ry Fix GYP build on OSX
ry authored
71 'AdditionalOptions': [
72 '/MP', # compile across multiple CPUs
73 ],
74 },
75 'VCLibrarianTool': {
76 'AdditionalOptions': [
77 '/LTCG', # link time code generation
78 ],
79 },
80 'VCLinkerTool': {
81 'LinkTimeCodeGeneration': 1, # link-time code generation
82 'OptimizeReferences': 2, # /OPT:REF
83 'EnableCOMDATFolding': 2, # /OPT:ICF
84 'LinkIncremental': 1, # disable incremental linking
85 },
86 },
87 }
88 },
89 'msvs_settings': {
90 'VCCLCompilerTool': {
91 'StringPooling': 'true', # pool string literals
92 'DebugInformationFormat': 3, # Generate a PDB
93 'WarningLevel': 3,
94 'BufferSecurityCheck': 'true',
95 'ExceptionHandling': 1, # /EHsc
96 'SuppressStartupBanner': 'true',
97 'WarnAsError': 'false',
98 },
99 'VCLibrarianTool': {
100 },
101 'VCLinkerTool': {
0a34755 enable x64 windows build
Igor Zinkovsky authored
102 'conditions': [
103 ['target_arch=="x64"', {
104 'TargetMachine' : 17 # /MACHINE:X64
105 }],
106 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
107 'GenerateDebugInformation': 'true',
108 'RandomizedBaseAddress': 2, # enable ASLR
109 'DataExecutionPrevention': 2, # enable DEP
110 'AllowIsolation': 'true',
111 'SuppressStartupBanner': 'true',
766430c @DrPizza Windows: set executables to be console programs
DrPizza authored
112 'target_conditions': [
113 ['_type=="executable"', {
114 'SubSystem': 1, # console executable
115 }],
116 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
117 },
118 },
119 'conditions': [
120 ['OS == "win"', {
121 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
122 'defines': [
123 'WIN32',
124 # we don't really want VC++ warning us about
125 # how dangerous C functions are...
126 '_CRT_SECURE_NO_DEPRECATE',
127 # ... or that C implementations shouldn't use
128 # POSIX names
129 '_CRT_NONSTDC_NO_DEPRECATE',
4a1efb2 @piscisaureus Support native extension loading on Windows
piscisaureus authored
130 'BUILDING_V8_SHARED=1',
131 'BUILDING_UV_SHARED=1',
25a5e90 @ry Fix GYP build on OSX
ry authored
132 ],
bbd976b @bnoordhuis build: always compile with large file support
bnoordhuis authored
133 }, {
134 'defines': [
135 '_LARGEFILE_SOURCE',
136 '_FILE_OFFSET_BITS=64',
137 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
138 }],
139 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
8a29e5e @martine gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in OpenSSL...
martine authored
140 'cflags': [ '-Wall', '-pthread', ],
141 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
142 'ldflags': [ '-pthread', ],
143 'conditions': [
144 [ 'target_arch=="ia32"', {
145 'cflags': [ '-m32' ],
146 'ldflags': [ '-m32' ],
147 }],
f624413 @rmustacc x64 target should always pass -m64
rmustacc authored
148 [ 'target_arch=="x64"', {
149 'cflags': [ '-m64' ],
150 'ldflags': [ '-m64' ],
151 }],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
152 [ 'OS=="linux"', {
55c2197 @shigeki build: compile without -fvisibility=hidden
shigeki authored
153 'ldflags': [ '-rdynamic' ],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
154 }],
3c68c85 @TooTallNate build: use -pthreads (not -pthread) on Solaris
TooTallNate authored
155 [ 'OS=="solaris"', {
156 'cflags': [ '-pthreads' ],
157 'ldflags': [ '-pthreads' ],
158 'cflags!': [ '-pthread' ],
159 'ldflags!': [ '-pthread' ],
160 }],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
161 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
162 }],
163 ['OS=="mac"', {
92c0c69 @bnoordhuis build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
bnoordhuis authored
164 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
165 'xcode_settings': {
166 'ALWAYS_SEARCH_USER_PATHS': 'NO',
167 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
168 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
169 # (Equivalent to -fPIC)
170 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
171 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
172 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
173 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
174 'GCC_VERSION': '4.2',
175 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
176 'PREBINDING': 'NO', # No -Wl,-prebind
7b71fd0 @TooTallNate build: add comment explaining MACOSX_DEPLOYMENT_TARGET.
TooTallNate authored
177 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
178 'USE_HEADERMAP': 'NO',
179 'OTHER_CFLAGS': [
180 '-fno-strict-aliasing',
181 ],
182 'WARNING_CFLAGS': [
183 '-Wall',
184 '-Wendif-labels',
185 '-W',
186 '-Wno-unused-parameter',
25a5e90 @ry Fix GYP build on OSX
ry authored
187 ],
188 },
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
189 'target_conditions': [
190 ['_type!="static_library"', {
191 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
192 }],
193 ],
546870e @TooTallNate build: use proper `-arch` for target_arch on OS X
TooTallNate authored
194 'conditions': [
195 ['target_arch=="ia32"', {
196 'xcode_settings': {'ARCHS': ['i386']},
197 }],
198 ['target_arch=="x64"', {
199 'xcode_settings': {'ARCHS': ['x86_64']},
200 }],
201 ],
25a5e90 @ry Fix GYP build on OSX
ry authored
202 }],
203 ],
a916d88 @martine common.gypi: don't nest "target_defaults" within "target_defaults"
martine authored
204 }
25a5e90 @ry Fix GYP build on OSX
ry authored
205 }
Something went wrong with that request. Please try again.