| 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     'chromium_code%': 0, | 10     'chromium_code%': 0, | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 35               # OS!="linux" and OS!="mac" | 35               # OS!="linux" and OS!="mac" | 
| 36               'host_arch%': 'ia32', | 36               'host_arch%': 'ia32', | 
| 37             }], | 37             }], | 
| 38           ], | 38           ], | 
| 39         }, | 39         }, | 
| 40         'host_arch%': '<(host_arch)', | 40         'host_arch%': '<(host_arch)', | 
| 41         'target_arch%': '<(host_arch)', | 41         'target_arch%': '<(host_arch)', | 
| 42       }, | 42       }, | 
| 43       'host_arch%': '<(host_arch)', | 43       'host_arch%': '<(host_arch)', | 
| 44       'target_arch%': '<(target_arch)', | 44       'target_arch%': '<(target_arch)', | 
|  | 45       'clang_use_chrome_plugins%': 0, | 
| 45     }, | 46     }, | 
| 46     'clang_dir%': 'third_party/llvm-build/Release+Asserts', | 47     'clang_dir%': 'third_party/llvm-build/Release+Asserts', | 
|  | 48     'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', | 
| 47     # These two are needed by V8. | 49     # These two are needed by V8. | 
| 48     'host_arch%': '<(host_arch)', | 50     'host_arch%': '<(host_arch)', | 
| 49     'target_arch%': '<(target_arch)', | 51     'target_arch%': '<(target_arch)', | 
| 50     'werror%': '-Werror', | 52     'werror%': '-Werror', | 
| 51     'v8_optimized_debug%': 0, | 53     'v8_optimized_debug%': 0, | 
| 52     'v8_use_external_startup_data%': 0, | 54     'v8_use_external_startup_data%': 0, | 
| 53     'icu_gyp_path': '../third_party/icu/icu.gyp', | 55     'icu_gyp_path': '../third_party/icu/icu.gyp', | 
| 54     'libjpeg_gyp_path': '../third_party/third_party.gyp', | 56     'libjpeg_gyp_path': '../third_party/third_party.gyp', | 
| 55     'conditions': [ | 57     'conditions': [ | 
| 56       ['OS == "win"', { | 58       ['OS == "win"', { | 
| 57         'os_posix%': 0, | 59         'os_posix%': 0, | 
| 58       }, { | 60       }, { | 
| 59         'os_posix%': 1, | 61         'os_posix%': 1, | 
| 60       }], | 62       }], | 
| 61       ['OS=="linux" or OS=="mac"', { | 63       ['OS=="linux" or OS=="mac"', { | 
| 62         'clang%': 1, | 64         'clang%': 1, | 
| 63         'host_clang%': 1, | 65         'host_clang%': 1, | 
| 64       }, { | 66       }, { | 
| 65         'clang%': 0, | 67         'clang%': 0, | 
| 66         'host_clang%': 0, | 68         'host_clang%': 0, | 
| 67       }], | 69       }], | 
| 68       # Set default gomadir. | 70       # Set default gomadir. | 
| 69       ['OS=="win"', { | 71       ['OS=="win"', { | 
| 70         'gomadir%': 'c:\\goma\\goma-win64', | 72         'gomadir%': 'c:\\goma\\goma-win64', | 
| 71       }, { | 73       }, { | 
| 72         'gomadir%': '<!(/bin/echo -n ${HOME}/goma)', | 74         'gomadir%': '<!(/bin/echo -n ${HOME}/goma)', | 
| 73       }], | 75       }], | 
|  | 76       ['clang_use_chrome_plugins==1', { | 
|  | 77         # Share the same settings as chromium in build/common.gypi. | 
|  | 78         'variables': { | 
|  | 79           'conditions': [ | 
|  | 80             ['OS!="win"', { | 
|  | 81               'variables': { | 
|  | 82                 'conditions': [ | 
|  | 83                   ['OS=="mac" or OS=="ios"', { | 
|  | 84                     'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll
     vm-build/Release+Asserts/lib/libFindBadConstructs.dylib', | 
|  | 85                   }, { # OS != "mac" and OS != "ios" | 
|  | 86                     'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll
     vm-build/Release+Asserts/lib/libFindBadConstructs.so', | 
|  | 87                   }], | 
|  | 88                 ], | 
|  | 89               }, | 
|  | 90               'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ', | 
|  | 91             }, { # OS == "win" | 
|  | 92               # On Windows, the plugin is built directly into clang, so there's | 
|  | 93               # no need to load it dynamically. | 
|  | 94               'clang_dynlib_flags%': '', | 
|  | 95             }], | 
|  | 96             ['OS=="android" or OS=="linux"', { | 
|  | 97               'clang_plugin_check_ipc_arg': '-Xclang -plugin-arg-find-bad-constr
     ucts -Xclang check-ipc', | 
|  | 98             }, { | 
|  | 99               'clang_plugin_check_ipc_arg': '', | 
|  | 100             }], | 
|  | 101           ], | 
|  | 102           'clang_plugin_args%': '-Xclang -plugin-arg-find-bad-constructs -Xclang
      check-templates ' | 
|  | 103           '-Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansio
     n ' | 
|  | 104           '-Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-c
     tors ', | 
|  | 105         }, | 
|  | 106         'clang_chrome_plugins_flags%': | 
|  | 107           '<(clang_dynlib_flags)' | 
|  | 108           '-Xclang -add-plugin -Xclang find-bad-constructs <(clang_plugin_args) 
     <(clang_plugin_check_ipc_arg)', | 
|  | 109       }], | 
| 74     ], | 110     ], | 
| 75   }, | 111   }, | 
| 76   'target_defaults': { | 112   'target_defaults': { | 
| 77     'default_configuration': 'Debug', | 113     'default_configuration': 'Debug', | 
| 78     'configurations': { | 114     'configurations': { | 
| 79       'Debug': { | 115       'Debug': { | 
| 80         'cflags': [ | 116         'cflags': [ | 
| 81           '-g', | 117           '-g', | 
| 82           '-O0', | 118           '-O0', | 
| 83           '-fdata-sections', | 119           '-fdata-sections', | 
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 319               # pattern. | 355               # pattern. | 
| 320               '-Wno-missing-field-initializers', | 356               '-Wno-missing-field-initializers', | 
| 321 | 357 | 
| 322               # TODO(hans): Make this list shorter eventually, http://crbug.com/
     504657 | 358               # TODO(hans): Make this list shorter eventually, http://crbug.com/
     504657 | 
| 323               '-Qunused-arguments',  # http://crbug.com/504658 | 359               '-Qunused-arguments',  # http://crbug.com/504658 | 
| 324               '-Wno-microsoft-enum-value',  # http://crbug.com/505296 | 360               '-Wno-microsoft-enum-value',  # http://crbug.com/505296 | 
| 325               '-Wno-unknown-pragmas',  # http://crbug.com/505314 | 361               '-Wno-unknown-pragmas',  # http://crbug.com/505314 | 
| 326               '-Wno-microsoft-cast',  # http://crbug.com/550065 | 362               '-Wno-microsoft-cast',  # http://crbug.com/550065 | 
| 327             ], | 363             ], | 
| 328           }], | 364           }], | 
|  | 365           ['clang==1 and clang_use_chrome_plugins==1', { | 
|  | 366             'AdditionalOptions': [ | 
|  | 367               '<@(clang_chrome_plugins_flags)', | 
|  | 368             ], | 
|  | 369           }], | 
| 329           ['OS=="win" and clang==1 and MSVS_VERSION == "2013"', { | 370           ['OS=="win" and clang==1 and MSVS_VERSION == "2013"', { | 
| 330             'AdditionalOptions': [ | 371             'AdditionalOptions': [ | 
| 331               '-fmsc-version=1800', | 372               '-fmsc-version=1800', | 
| 332             ], | 373             ], | 
| 333           }], | 374           }], | 
| 334           ['OS=="win" and clang==1 and MSVS_VERSION == "2015"', { | 375           ['OS=="win" and clang==1 and MSVS_VERSION == "2015"', { | 
| 335             'AdditionalOptions': [ | 376             'AdditionalOptions': [ | 
| 336               '-fmsc-version=1900', | 377               '-fmsc-version=1900', | 
| 337             ], | 378             ], | 
| 338           }], | 379           }], | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 371       'USE_HEADERMAP': 'NO', | 412       'USE_HEADERMAP': 'NO', | 
| 372       'OTHER_CFLAGS': [ | 413       'OTHER_CFLAGS': [ | 
| 373         '-fno-strict-aliasing', | 414         '-fno-strict-aliasing', | 
| 374       ], | 415       ], | 
| 375       'WARNING_CFLAGS': [ | 416       'WARNING_CFLAGS': [ | 
| 376         '-Wall', | 417         '-Wall', | 
| 377         '-Werror', | 418         '-Werror', | 
| 378         '-Wextra', | 419         '-Wextra', | 
| 379         '-Wno-unused-parameter', | 420         '-Wno-unused-parameter', | 
| 380       ], | 421       ], | 
|  | 422       'conditions': [ | 
|  | 423         ['clang==1 and clang_use_chrome_plugins==1', { | 
|  | 424           'OTHER_CFLAGS': [ | 
|  | 425             '<@(clang_chrome_plugins_flags)', | 
|  | 426           ], | 
|  | 427         }], | 
|  | 428       ], | 
| 381     }, | 429     }, | 
| 382     'variables': { | 430     'variables': { | 
| 383       'chromium_code%': '<(chromium_code)', | 431       'chromium_code%': '<(chromium_code)', | 
| 384       'clang_warning_flags': [ | 432       'clang_warning_flags': [ | 
| 385         # TODO(thakis): https://crbug.com/604888 | 433         # TODO(thakis): https://crbug.com/604888 | 
| 386         '-Wno-undefined-var-template', | 434         '-Wno-undefined-var-template', | 
| 387       ], | 435       ], | 
| 388     }, | 436     }, | 
| 389     'includes': [ 'set_clang_warning_flags.gypi', ], | 437     'includes': [ 'set_clang_warning_flags.gypi', ], | 
| 390     'conditions': [ | 438     'conditions': [ | 
|  | 439       ['clang==1 and clang_use_chrome_plugins==1', { | 
|  | 440         'cflags': [ | 
|  | 441           '<@(clang_chrome_plugins_flags)', | 
|  | 442         ], | 
|  | 443       }], | 
| 391       ['component=="shared_library"', { | 444       ['component=="shared_library"', { | 
| 392         'cflags': [ | 445         'cflags': [ | 
| 393           '-fPIC', | 446           '-fPIC', | 
| 394         ], | 447         ], | 
| 395       }], | 448       }], | 
| 396       ['asan==1', { | 449       ['asan==1', { | 
| 397         'defines': [ | 450         'defines': [ | 
| 398           'ADDRESS_SANITIZER', | 451           'ADDRESS_SANITIZER', | 
| 399           'LEAK_SANITIZER', | 452           'LEAK_SANITIZER', | 
| 400         ], | 453         ], | 
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 529       ], | 582       ], | 
| 530     }],  # OS=="win" | 583     }],  # OS=="win" | 
| 531     ["use_goma==1", { | 584     ["use_goma==1", { | 
| 532       'make_global_settings': [ | 585       'make_global_settings': [ | 
| 533         ['CC_wrapper', '<(gomadir)/gomacc'], | 586         ['CC_wrapper', '<(gomadir)/gomacc'], | 
| 534         ['CXX_wrapper', '<(gomadir)/gomacc'], | 587         ['CXX_wrapper', '<(gomadir)/gomacc'], | 
| 535       ], | 588       ], | 
| 536     }],  # use_goma==1 | 589     }],  # use_goma==1 | 
| 537   ], | 590   ], | 
| 538 } | 591 } | 
| OLD | NEW | 
|---|