Skip to content
This repository
Newer
Older
100644 164 lines (163 sloc) 6.021 kb
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
1 {
2 'variables': {
b433c42a » ry
2011-08-15 gyp: Support Linux
3 'visibility%': 'hidden', # V8's visibility setting
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
4 'target_arch%': 'ia32', # set v8's target architecture
5 'host_arch%': 'ia32', # set v8's host architecture
6 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
7 'component%': 'static_library', # NB. these names match with what V8 expects
8 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
9 },
10
11 'target_defaults': {
12 'default_configuration': 'Debug',
13 'configurations': {
14 'Debug': {
15 'defines': [ 'DEBUG', '_DEBUG' ],
16 'cflags': [ '-g', '-O0' ],
17 'msvs_settings': {
18 'VCCLCompilerTool': {
19 'target_conditions': [
20 ['library=="static_library"', {
21 'RuntimeLibrary': 1, # static debug
22 }, {
23 'RuntimeLibrary': 3, # DLL debug
24 }],
25 ],
26 'Optimization': 0, # /Od, no optimization
27 'MinimalRebuild': 'true',
28 'OmitFramePointers': 'false',
29 'BasicRuntimeChecks': 3, # /RTC1
30 },
31 'VCLinkerTool': {
32 'LinkIncremental': 2, # enable incremental linking
33 },
34 },
35 },
36 'Release': {
37 'defines': [ 'NDEBUG' ],
38 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
39 'msvs_settings': {
40 'VCCLCompilerTool': {
41 'target_conditions': [
42 ['library=="static_library"', {
43 'RuntimeLibrary': 0, # static release
44 }, {
45 'RuntimeLibrary': 2, # debug release
46 }],
47 ],
48 'Optimization': 3, # /Ox, full optimization
49 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
50 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
51 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
52 'OmitFramePointers': 'true',
53 'EnableFunctionLevelLinking': 'true',
54 'EnableIntrinsicFunctions': 'true',
55 'AdditionalOptions': [
56 '/MP', # compile across multiple CPUs
57 ],
58 },
59 'VCLibrarianTool': {
60 'AdditionalOptions': [
61 '/LTCG', # link time code generation
62 ],
63 },
64 'VCLinkerTool': {
65 'LinkTimeCodeGeneration': 1, # link-time code generation
66 'OptimizeReferences': 2, # /OPT:REF
67 'EnableCOMDATFolding': 2, # /OPT:ICF
68 'LinkIncremental': 1, # disable incremental linking
69 },
70 },
71 }
72 },
73 'msvs_settings': {
74 'VCCLCompilerTool': {
75 'StringPooling': 'true', # pool string literals
76 'DebugInformationFormat': 3, # Generate a PDB
77 'WarningLevel': 3,
78 'BufferSecurityCheck': 'true',
79 'ExceptionHandling': 1, # /EHsc
80 'SuppressStartupBanner': 'true',
81 'WarnAsError': 'false',
82 },
83 'VCLibrarianTool': {
84 },
85 'VCLinkerTool': {
86 'GenerateDebugInformation': 'true',
87 'RandomizedBaseAddress': 2, # enable ASLR
88 'DataExecutionPrevention': 2, # enable DEP
89 'AllowIsolation': 'true',
90 'SuppressStartupBanner': 'true',
766430c7 » DrPizza
2011-08-30 Windows: set executables to be console programs
91 'target_conditions': [
92 ['_type=="executable"', {
93 'SubSystem': 1, # console executable
94 }],
95 ],
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
96 },
97 },
98 'conditions': [
99 ['OS == "win"', {
100 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
101 'defines': [
102 'WIN32',
103 # we don't really want VC++ warning us about
104 # how dangerous C functions are...
105 '_CRT_SECURE_NO_DEPRECATE',
106 # ... or that C implementations shouldn't use
107 # POSIX names
108 '_CRT_NONSTDC_NO_DEPRECATE',
109 ],
110 }],
111 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
8a29e5ea » martine
2011-08-23 gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in Open…
112 'cflags': [ '-Wall', '-pthread', ],
113 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
a916d888 » martine
2011-08-23 common.gypi: don't nest "target_defaults" within "target_defaults"
114 'ldflags': [ '-pthread', ],
115 'conditions': [
116 [ 'target_arch=="ia32"', {
117 'cflags': [ '-m32' ],
118 'ldflags': [ '-m32' ],
119 }],
120 [ 'OS=="linux"', {
121 'cflags': [ '-ansi' ],
122 }],
123 [ 'visibility=="hidden"', {
124 'cflags': [ '-fvisibility=hidden' ],
125 }],
126 ],
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
127 }],
128 ['OS=="mac"', {
a916d888 » martine
2011-08-23 common.gypi: don't nest "target_defaults" within "target_defaults"
129 'xcode_settings': {
130 'ALWAYS_SEARCH_USER_PATHS': 'NO',
131 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
132 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
133 # (Equivalent to -fPIC)
134 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
135 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
136 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
137 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
138 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
139 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
140 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
141 'GCC_VERSION': '4.2',
142 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
143 'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
144 'PREBINDING': 'NO', # No -Wl,-prebind
145 'USE_HEADERMAP': 'NO',
146 'OTHER_CFLAGS': [
147 '-fno-strict-aliasing',
148 ],
149 'WARNING_CFLAGS': [
150 '-Wall',
151 '-Wendif-labels',
152 '-W',
153 '-Wno-unused-parameter',
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
154 ],
155 },
a916d888 » martine
2011-08-23 common.gypi: don't nest "target_defaults" within "target_defaults"
156 'target_conditions': [
157 ['_type!="static_library"', {
158 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
159 }],
160 ],
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
161 }],
162 ],
a916d888 » martine
2011-08-23 common.gypi: don't nest "target_defaults" within "target_defaults"
163 }
25a5e902 » ry
2011-08-15 Fix GYP build on OSX
164 }
Something went wrong with that request. Please try again.