Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 PDFium Authors. All rights reserved. | 1 # Copyright 2014 PDFium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Definitions to be used when building stand-alone PDFium binaries. | 5 # Definitions to be used when building stand-alone PDFium binaries. |
| 6 | 6 |
| 7 { | 7 { |
| 8 'variables': { | 8 'variables': { |
| 9 'component%': 'static_library', | 9 'component%': 'static_library', |
| 10 'clang%': 0, | 10 'clang%': 0, |
| 11 'asan%': 0, | |
| 12 'sanitizer_coverage%': 0, | |
| 11 'msvs_multi_core_compile%': '1', | 13 'msvs_multi_core_compile%': '1', |
| 12 'variables': { | 14 'variables': { |
| 13 'variables': { | 15 'variables': { |
| 14 'variables': { | 16 'variables': { |
| 15 'conditions': [ | 17 'conditions': [ |
| 16 ['OS=="linux" or OS=="mac"', { | 18 ['OS=="linux" or OS=="mac"', { |
| 17 # This handles the Unix platforms we generally deal with. | 19 # This handles the Unix platforms we generally deal with. |
| 18 # Anything else gets passed through, which probably won't work | 20 # Anything else gets passed through, which probably won't work |
| 19 # very well; such hosts should pass an explicit target_arch | 21 # very well; such hosts should pass an explicit target_arch |
| 20 # to gyp. | 22 # to gyp. |
| 21 'host_arch%': | 23 'host_arch%': |
| 22 '<!(uname -m | sed -e "s/i.86/ia32/;\ | 24 '<!(uname -m | sed -e "s/i.86/ia32/;\ |
| 23 s/x86_64/x64/;\ | 25 s/x86_64/x64/;\ |
| 24 s/amd64/x64/;\ | 26 s/amd64/x64/;\ |
| 25 s/arm.*/arm/;\ | 27 s/arm.*/arm/;\ |
| 26 s/aarch64/arm64/;\ | 28 s/aarch64/arm64/;\ |
| 27 s/mips.*/mipsel/")', | 29 s/mips.*/mipsel/")', |
| 28 }, { | 30 }, { |
| 29 # OS!="linux" and OS!="mac" | 31 # OS!="linux" and OS!="mac" |
| 30 'host_arch%': 'ia32', | 32 'host_arch%': 'ia32', |
| 31 }], | 33 }], |
| 32 ], | 34 ], |
| 33 }, | 35 }, |
| 34 'host_arch%': '<(host_arch)', | 36 'host_arch%': '<(host_arch)', |
| 35 'target_arch%': '<(host_arch)', | 37 'target_arch%': '<(host_arch)', |
| 36 }, | 38 }, |
| 37 'host_arch%': '<(host_arch)', | 39 'host_arch%': '<(host_arch)', |
| 38 'target_arch%': '<(target_arch)', | 40 'target_arch%': '<(target_arch)', |
| 41 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()")' , | |
|
Nico
2015/10/15 23:41:22
I don't think you need this…build/common.gypi does
Oliver Chang
2015/10/16 00:52:15
Ah, I based this off v8's standalone.gypi, but I g
| |
| 39 }, | 42 }, |
| 43 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts', | |
|
Nico
2015/10/15 23:41:22
try removing the <(base_dir)/ prefix here
Oliver Chang
2015/10/16 00:52:15
Done.
| |
| 40 # These two are needed by V8. | 44 # These two are needed by V8. |
| 41 'host_arch%': '<(host_arch)', | 45 'host_arch%': '<(host_arch)', |
| 42 'target_arch%': '<(target_arch)', | 46 'target_arch%': '<(target_arch)', |
| 43 'werror%': '-Werror', | 47 'werror%': '-Werror', |
| 44 'v8_optimized_debug%': 0, | 48 'v8_optimized_debug%': 0, |
| 45 'v8_use_external_startup_data%': 0, | 49 'v8_use_external_startup_data%': 0, |
| 46 'icu_gyp_path': '../v8/third_party/icu/icu.gyp', | 50 'icu_gyp_path': '../v8/third_party/icu/icu.gyp', |
| 47 'conditions': [ | 51 'conditions': [ |
| 48 ['OS == "win"', { | 52 ['OS == "win"', { |
| 49 'os_posix%': 0, | 53 'os_posix%': 0, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 '-fvisibility=hidden', | 158 '-fvisibility=hidden', |
| 155 ], | 159 ], |
| 156 'cflags_cc': [ | 160 'cflags_cc': [ |
| 157 '-std=gnu++0x', | 161 '-std=gnu++0x', |
| 158 '-Wnon-virtual-dtor', | 162 '-Wnon-virtual-dtor', |
| 159 '-fno-rtti', | 163 '-fno-rtti', |
| 160 ], | 164 ], |
| 161 'ldflags': [ | 165 'ldflags': [ |
| 162 '-pthread', | 166 '-pthread', |
| 163 ], | 167 ], |
| 168 'conditions': [ | |
| 169 ['asan==1', { | |
| 170 'cflags': [ | |
| 171 '-fsanitize=address', | |
| 172 '-gline-tables-only', | |
| 173 ], | |
| 174 'ldflags': [ | |
| 175 '-fsanitize=address', | |
| 176 ], | |
| 177 }], | |
| 178 ['sanitizer_coverage!=0', { | |
| 179 'cflags': [ | |
| 180 '-fsanitize-coverage=<(sanitizer_coverage)', | |
| 181 ], | |
| 182 }], | |
| 183 ], | |
| 164 'defines': [ | 184 'defines': [ |
| 165 # Don't use deprecated V8 APIs anywhere. | 185 # Don't use deprecated V8 APIs anywhere. |
| 166 'V8_DEPRECATION_WARNINGS', | 186 'V8_DEPRECATION_WARNINGS', |
| 167 ], | 187 ], |
| 168 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], | 188 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], |
| 169 'msvs_configuration_attributes': { | 189 'msvs_configuration_attributes': { |
| 170 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', | 190 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', |
| 171 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', | 191 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 172 'CharacterSet': '1', | 192 'CharacterSet': '1', |
| 173 }, | 193 }, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 '-Wno-unused-parameter', | 263 '-Wno-unused-parameter', |
| 244 ], | 264 ], |
| 245 }, | 265 }, |
| 246 }, | 266 }, |
| 247 'conditions': [ | 267 'conditions': [ |
| 248 ['component=="shared_library"', { | 268 ['component=="shared_library"', { |
| 249 'cflags': [ | 269 'cflags': [ |
| 250 '-fPIC', | 270 '-fPIC', |
| 251 ], | 271 ], |
| 252 }], | 272 }], |
| 273 ['OS=="linux"', { | |
|
Nico
2015/10/15 23:41:22
don't you want this on mac too?
actually, shouldn
Lei Zhang
2015/10/16 00:23:16
I don't build on Mac much, but I suppose we should
Oliver Chang
2015/10/16 00:52:15
I don't have a Mac to test this on, but I guess it
| |
| 274 'conditions': [ | |
| 275 ['clang==1', { | |
| 276 'make_global_settings': [ | |
| 277 ['CC', '<(clang_dir)/bin/clang'], | |
| 278 ['CXX', '<(clang_dir)/bin/clang++'], | |
| 279 ], | |
| 280 }], | |
| 281 ], | |
| 282 }], # OS=="linux" | |
| 253 ['OS=="win"', { | 283 ['OS=="win"', { |
| 254 'target_defaults': { | 284 'target_defaults': { |
| 255 'defines': [ | 285 'defines': [ |
| 256 'NOMINMAX', | 286 'NOMINMAX', |
| 257 '_CRT_SECURE_NO_DEPRECATE', | 287 '_CRT_SECURE_NO_DEPRECATE', |
| 258 '_CRT_NONSTDC_NO_DEPRECATE', | 288 '_CRT_NONSTDC_NO_DEPRECATE', |
| 259 ], | 289 ], |
| 260 'conditions': [ | 290 'conditions': [ |
| 261 ['component=="static_library"', { | 291 ['component=="static_library"', { |
| 262 'defines': [ | 292 'defines': [ |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 281 'V8_USE_EXTERNAL_STARTUP_DATA', | 311 'V8_USE_EXTERNAL_STARTUP_DATA', |
| 282 ], | 312 ], |
| 283 }, | 313 }, |
| 284 }], # v8_use_external_startup_data==1 | 314 }], # v8_use_external_startup_data==1 |
| 285 ], | 315 ], |
| 286 'xcode_settings': { | 316 'xcode_settings': { |
| 287 # See comment in Chromium's common.gypi for why this is needed. | 317 # See comment in Chromium's common.gypi for why this is needed. |
| 288 'SYMROOT': '<(DEPTH)/xcodebuild', | 318 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 289 } | 319 } |
| 290 } | 320 } |
| OLD | NEW |