Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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