OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2014 PDFium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # Definitions to be used when building stand-alone PDFium binaries. | |
6 | |
7 { | |
8 'variables': { | |
9 'component%': 'static_library', | |
10 'clang%': 0, | |
Nico
2014/05/24 23:14:23
Nothing reads this.
jam
2014/05/27 01:46:21
will also remove in a followup
jam
2014/05/27 04:45:06
actually looks like it's used in pdfium.gyp
| |
11 'msvs_multi_core_compile%': '1', | |
12 'variables': { | |
13 'variables': { | |
14 'variables': { | |
15 'conditions': [ | |
16 ['OS=="linux" or OS=="mac"', { | |
17 # This handles the Unix platforms we generally deal with. | |
18 # Anything else gets passed through, which probably won't work | |
19 # very well; such hosts should pass an explicit target_arch | |
20 # to gyp. | |
21 'host_arch%': | |
22 '<!(uname -m | sed -e "s/i.86/ia32/;\ | |
23 s/x86_64/x64/;\ | |
24 s/amd64/x64/;\ | |
25 s/arm.*/arm/;\ | |
26 s/aarch64/arm64/;\ | |
27 s/mips.*/mipsel/")', | |
28 }, { | |
29 # OS!="linux" and OS!="mac" | |
30 'host_arch%': 'ia32', | |
31 }], | |
32 ], | |
33 }, | |
34 'host_arch%': '<(host_arch)', | |
35 'target_arch%': '<(host_arch)', | |
36 }, | |
37 'host_arch%': '<(host_arch)', | |
38 'target_arch%': '<(target_arch)', | |
39 }, | |
40 'host_arch%': '<(host_arch)', | |
41 'target_arch%': '<(target_arch)', | |
Nico
2014/05/24 23:14:23
It looks like nothing reads host_arch and target_a
jam
2014/05/27 01:46:21
these were needed by v8's gyp files. does that mak
| |
42 'werror%': '-Werror', | |
43 'v8_optimized_debug%': 0, | |
44 'icu_gyp_path': '../v8/third_party/icu/icu.gyp', | |
45 'conditions': [ | |
46 ['OS == "win"', { | |
47 'os_posix%': 0, | |
48 }, { | |
49 'os_posix%': 1, | |
50 }], | |
51 ], | |
52 }, | |
53 'target_defaults': { | |
54 'default_configuration': 'Debug', | |
55 'configurations': { | |
56 'Debug': { | |
57 'cflags': [ | |
58 '-g', | |
59 '-O0', | |
60 '-fdata-sections', | |
61 '-ffunction-sections', | |
62 ], | |
63 'msvs_settings': { | |
64 'VCCLCompilerTool': { | |
65 'Optimization': '0', | |
66 'conditions': [ | |
67 ['component=="shared_library"', { | |
68 'RuntimeLibrary': '3', # /MDd | |
69 }, { | |
70 'RuntimeLibrary': '1', # /MTd | |
71 }], | |
72 ], | |
73 }, | |
74 'VCLinkerTool': { | |
75 'LinkIncremental': '2', | |
76 }, | |
77 }, | |
78 'xcode_settings': { | |
79 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | |
80 }, | |
81 }, | |
82 'Release': { | |
83 'cflags': [ | |
84 '-fno-strict-aliasing', | |
85 ], | |
86 'xcode_settings': { | |
87 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | |
88 'GCC_STRICT_ALIASING': 'NO', | |
89 }, | |
90 'msvs_settings': { | |
91 'VCCLCompilerTool': { | |
92 'Optimization': '2', | |
93 'InlineFunctionExpansion': '2', | |
94 'EnableIntrinsicFunctions': 'true', | |
95 'FavorSizeOrSpeed': '0', | |
96 'StringPooling': 'true', | |
97 'conditions': [ | |
98 ['component=="shared_library"', { | |
99 'RuntimeLibrary': '2', #/MD | |
100 }, { | |
101 'RuntimeLibrary': '0', #/MT | |
102 }], | |
103 ], | |
104 }, | |
105 'VCLinkerTool': { | |
106 'LinkIncremental': '1', | |
107 'OptimizeReferences': '2', | |
108 'EnableCOMDATFolding': '2', | |
109 }, | |
110 }, | |
111 'conditions': [ | |
112 ['OS=="linux"', { | |
113 'cflags': [ | |
114 '-fdata-sections', | |
115 '-ffunction-sections', | |
116 '-O3', | |
117 '-O2', | |
118 ], | |
119 }], | |
120 ['OS=="android"', { | |
121 'cflags!': [ | |
122 '-O3', | |
123 '-Os', | |
124 ], | |
125 'cflags': [ | |
126 '-fdata-sections', | |
127 '-ffunction-sections', | |
128 '-O2', | |
129 ], | |
130 }], | |
131 ], # conditions | |
132 }, | |
133 }, | |
134 'defines!': [ | |
135 'DEBUG', | |
136 ], | |
137 'cflags!': [ | |
Nico
2014/05/24 23:14:23
You mean 'cflags', not 'cflags!' here, right? (The
jam
2014/05/27 01:46:21
oops, that was by accident. fixing in followup
| |
138 '-Wall', | |
139 '-W', | |
140 '-Wno-unused-parameter', | |
141 '-pthread', '-fno-exceptions', | |
142 '-fvisibility=hidden', | |
143 ], | |
144 'cflags_cc': [ | |
145 '-Wnon-virtual-dtor', | |
146 '-fno-rtti', | |
147 ], | |
148 'ldflags': [ | |
149 '-pthread', | |
150 ], | |
151 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], | |
152 'msvs_configuration_attributes': { | |
153 'OutputDirectory': '<(DEPTH)\\out\\$(ConfigurationName)', | |
154 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', | |
155 'CharacterSet': '1', | |
156 }, | |
157 'msvs_settings': { | |
158 'VCCLCompilerTool': { | |
159 'MinimalRebuild': 'false', | |
160 'BufferSecurityCheck': 'true', | |
161 'EnableFunctionLevelLinking': 'true', | |
162 'RuntimeTypeInfo': 'false', | |
163 'WarningLevel': '3', | |
164 'WarnAsError': 'false', | |
165 'DebugInformationFormat': '3', | |
166 'Detect64BitPortabilityProblems': 'false', | |
167 'conditions': [ | |
168 [ 'msvs_multi_core_compile', { | |
169 'AdditionalOptions': ['/MP'], | |
170 }], | |
171 ['component=="shared_library"', { | |
172 'ExceptionHandling': '1', # /EHsc | |
173 }, { | |
174 'ExceptionHandling': '0', | |
175 }], | |
176 ], | |
177 }, | |
178 'VCLibrarianTool': { | |
179 'AdditionalOptions': ['/ignore:4221'], | |
180 }, | |
181 'VCLinkerTool': { | |
182 'GenerateDebugInformation': 'true', | |
183 'LinkIncremental': '1', | |
184 # SubSystem values: | |
185 # 0 == not set | |
186 # 1 == /SUBSYSTEM:CONSOLE | |
187 # 2 == /SUBSYSTEM:WINDOWS | |
188 'SubSystem': '1', | |
189 'AdditionalDependencies': [ | |
190 'advapi32.lib', | |
191 'gdi32.lib', | |
192 'user32.lib', | |
193 ], | |
194 }, | |
195 }, | |
196 'xcode_settings': { | |
197 'ALWAYS_SEARCH_USER_PATHS': 'NO', | |
198 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks | |
199 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic | |
200 # (Equivalent to -fPIC) | |
201 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions | |
202 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti | |
203 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings | |
204 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden | |
205 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', | |
206 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | |
207 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror | |
208 'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor | |
209 'SYMROOT': '<(DEPTH)/xcodebuild', | |
210 'USE_HEADERMAP': 'NO', | |
211 'OTHER_CFLAGS': [ | |
212 '-fno-strict-aliasing', | |
213 ], | |
214 'WARNING_CFLAGS': [ | |
215 '-Wall', | |
216 '-Wendif-labels', | |
217 '-W', | |
218 '-Wno-unused-parameter', | |
219 ], | |
220 }, | |
221 }, | |
222 'conditions': [ | |
223 ['component=="shared_library"', { | |
224 'cflags': [ | |
225 '-fPIC', | |
226 ], | |
227 }], | |
228 ['OS=="win"', { | |
229 'target_defaults': { | |
230 'defines': [ | |
231 '_CRT_SECURE_NO_DEPRECATE', | |
232 '_CRT_NONSTDC_NO_DEPRECATE', | |
233 ], | |
234 'conditions': [ | |
235 ['component=="static_library"', { | |
236 'defines': [ | |
237 '_HAS_EXCEPTIONS=0', | |
238 ], | |
239 }], | |
240 ], | |
241 }, | |
242 }], # OS=="win" | |
243 ['OS=="mac"', { | |
244 'target_defaults': { | |
245 'link_settings': { | |
246 'libraries': [ | |
247 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', | |
248 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', | |
249 ], | |
250 }, | |
251 'target_conditions': [ | |
252 ['_type!="static_library"', { | |
253 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, | |
254 }], | |
255 ], # target_conditions | |
256 }, # target_defaults | |
257 }], # OS=="mac" | |
258 ], | |
259 } | |
OLD | NEW |