| 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)', |
| 39 }, | 41 }, |
| 42 'clang_dir%': 'third_party/llvm-build/Release+Asserts', |
| 40 # These two are needed by V8. | 43 # These two are needed by V8. |
| 41 'host_arch%': '<(host_arch)', | 44 'host_arch%': '<(host_arch)', |
| 42 'target_arch%': '<(target_arch)', | 45 'target_arch%': '<(target_arch)', |
| 43 'werror%': '-Werror', | 46 'werror%': '-Werror', |
| 44 'v8_optimized_debug%': 0, | 47 'v8_optimized_debug%': 0, |
| 45 'v8_use_external_startup_data%': 0, | 48 'v8_use_external_startup_data%': 0, |
| 46 'icu_gyp_path': '../v8/third_party/icu/icu.gyp', | 49 'icu_gyp_path': '../v8/third_party/icu/icu.gyp', |
| 47 'conditions': [ | 50 'conditions': [ |
| 48 ['OS == "win"', { | 51 ['OS == "win"', { |
| 49 'os_posix%': 0, | 52 'os_posix%': 0, |
| 50 }, { | 53 }, { |
| 51 'os_posix%': 1, | 54 'os_posix%': 1, |
| 52 }], | 55 }], |
| 56 ['OS=="linux" or OS=="mac"', { |
| 57 'clang%': 1, |
| 58 }, { |
| 59 'clang%': 0, |
| 60 }], |
| 53 ], | 61 ], |
| 54 }, | 62 }, |
| 55 'target_defaults': { | 63 'target_defaults': { |
| 56 'default_configuration': 'Debug', | 64 'default_configuration': 'Debug', |
| 57 'configurations': { | 65 'configurations': { |
| 58 'Debug': { | 66 'Debug': { |
| 59 'cflags': [ | 67 'cflags': [ |
| 60 '-g', | 68 '-g', |
| 61 '-O0', | 69 '-O0', |
| 62 '-fdata-sections', | 70 '-fdata-sections', |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 '-fvisibility=hidden', | 162 '-fvisibility=hidden', |
| 155 ], | 163 ], |
| 156 'cflags_cc': [ | 164 'cflags_cc': [ |
| 157 '-std=gnu++0x', | 165 '-std=gnu++0x', |
| 158 '-Wnon-virtual-dtor', | 166 '-Wnon-virtual-dtor', |
| 159 '-fno-rtti', | 167 '-fno-rtti', |
| 160 ], | 168 ], |
| 161 'ldflags': [ | 169 'ldflags': [ |
| 162 '-pthread', | 170 '-pthread', |
| 163 ], | 171 ], |
| 172 'conditions': [ |
| 173 ['asan==1', { |
| 174 'cflags': [ |
| 175 '-fsanitize=address', |
| 176 '-gline-tables-only', |
| 177 ], |
| 178 'ldflags': [ |
| 179 '-fsanitize=address', |
| 180 ], |
| 181 }], |
| 182 ['sanitizer_coverage!=0', { |
| 183 'cflags': [ |
| 184 '-fsanitize-coverage=<(sanitizer_coverage)', |
| 185 ], |
| 186 }], |
| 187 ], |
| 164 'defines': [ | 188 'defines': [ |
| 165 # Don't use deprecated V8 APIs anywhere. | 189 # Don't use deprecated V8 APIs anywhere. |
| 166 'V8_DEPRECATION_WARNINGS', | 190 'V8_DEPRECATION_WARNINGS', |
| 167 ], | 191 ], |
| 168 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], | 192 'msvs_cygwin_dirs': ['<(DEPTH)/v8/third_party/cygwin'], |
| 169 'msvs_configuration_attributes': { | 193 'msvs_configuration_attributes': { |
| 170 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', | 194 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', |
| 171 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', | 195 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 172 'CharacterSet': '1', | 196 'CharacterSet': '1', |
| 173 }, | 197 }, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 '-Wno-unused-parameter', | 267 '-Wno-unused-parameter', |
| 244 ], | 268 ], |
| 245 }, | 269 }, |
| 246 }, | 270 }, |
| 247 'conditions': [ | 271 'conditions': [ |
| 248 ['component=="shared_library"', { | 272 ['component=="shared_library"', { |
| 249 'cflags': [ | 273 'cflags': [ |
| 250 '-fPIC', | 274 '-fPIC', |
| 251 ], | 275 ], |
| 252 }], | 276 }], |
| 277 ['OS=="linux" or OS=="mac"', { |
| 278 'conditions': [ |
| 279 ['clang==1', { |
| 280 'make_global_settings': [ |
| 281 ['CC', '<(clang_dir)/bin/clang'], |
| 282 ['CXX', '<(clang_dir)/bin/clang++'], |
| 283 ], |
| 284 }], |
| 285 ], |
| 286 }], # OS=="linux" or OS=="mac" |
| 253 ['OS=="win"', { | 287 ['OS=="win"', { |
| 254 'target_defaults': { | 288 'target_defaults': { |
| 255 'defines': [ | 289 'defines': [ |
| 256 'NOMINMAX', | 290 'NOMINMAX', |
| 257 '_CRT_SECURE_NO_DEPRECATE', | 291 '_CRT_SECURE_NO_DEPRECATE', |
| 258 '_CRT_NONSTDC_NO_DEPRECATE', | 292 '_CRT_NONSTDC_NO_DEPRECATE', |
| 259 ], | 293 ], |
| 260 'conditions': [ | 294 'conditions': [ |
| 261 ['component=="static_library"', { | 295 ['component=="static_library"', { |
| 262 'defines': [ | 296 'defines': [ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 281 'V8_USE_EXTERNAL_STARTUP_DATA', | 315 'V8_USE_EXTERNAL_STARTUP_DATA', |
| 282 ], | 316 ], |
| 283 }, | 317 }, |
| 284 }], # v8_use_external_startup_data==1 | 318 }], # v8_use_external_startup_data==1 |
| 285 ], | 319 ], |
| 286 'xcode_settings': { | 320 'xcode_settings': { |
| 287 # See comment in Chromium's common.gypi for why this is needed. | 321 # See comment in Chromium's common.gypi for why this is needed. |
| 288 'SYMROOT': '<(DEPTH)/xcodebuild', | 322 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 289 } | 323 } |
| 290 } | 324 } |
| OLD | NEW |