| 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 'clang%': 0, | 11 'clang%': 0, |
| 11 'asan%': 0, | 12 'asan%': 0, |
| 12 'sanitizer_coverage%': 0, | 13 'sanitizer_coverage%': 0, |
| 13 'use_goma%': 0, | 14 'use_goma%': 0, |
| 14 'gomadir%': '', | 15 'gomadir%': '', |
| 15 'msvs_multi_core_compile%': '1', | 16 'msvs_multi_core_compile%': '1', |
| 16 'pdf_enable_xfa%': 1, | 17 'pdf_enable_xfa%': 1, |
| 17 'variables': { | 18 'variables': { |
| 18 'variables': { | 19 'variables': { |
| 19 'variables': { | 20 'variables': { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 'msvs_configuration_platform': 'x64', | 166 'msvs_configuration_platform': 'x64', |
| 166 }, | 167 }, |
| 167 'Release_x64': { | 168 'Release_x64': { |
| 168 'inherit_from': ['Release'], | 169 'inherit_from': ['Release'], |
| 169 'msvs_configuration_platform': 'x64', | 170 'msvs_configuration_platform': 'x64', |
| 170 }, | 171 }, |
| 171 }, | 172 }, |
| 172 'cflags': [ | 173 'cflags': [ |
| 173 '-Wall', | 174 '-Wall', |
| 174 '-Werror', | 175 '-Werror', |
| 175 '-W', | 176 '-Wextra', |
| 177 # Two common warning flags for Clang and GCC. |
| 176 '-Wno-missing-field-initializers', | 178 '-Wno-missing-field-initializers', |
| 177 # Code might someday be made clean for -Wsign-compare, but for now | |
| 178 # this produces too much noise to be useful. | |
| 179 '-Wno-sign-compare', | |
| 180 '-Wno-unused-parameter', | 179 '-Wno-unused-parameter', |
| 181 '-pthread', | 180 '-pthread', |
| 182 '-fno-exceptions', | 181 '-fno-exceptions', |
| 183 '-fvisibility=hidden', | 182 '-fvisibility=hidden', |
| 184 ], | 183 ], |
| 185 'cflags_cc': [ | 184 'cflags_cc': [ |
| 186 '-std=c++11', | 185 '-std=c++11', |
| 187 # Add back when ICU is clean | 186 # Add back when ICU is clean |
| 188 # '-Wnon-virtual-dtor', | 187 # '-Wnon-virtual-dtor', |
| 189 '-fno-rtti', | 188 '-fno-rtti', |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 # SubSystem values: | 352 # SubSystem values: |
| 354 # 0 == not set | 353 # 0 == not set |
| 355 # 1 == /SUBSYSTEM:CONSOLE | 354 # 1 == /SUBSYSTEM:CONSOLE |
| 356 # 2 == /SUBSYSTEM:WINDOWS | 355 # 2 == /SUBSYSTEM:WINDOWS |
| 357 'SubSystem': '1', | 356 'SubSystem': '1', |
| 358 }, | 357 }, |
| 359 }, | 358 }, |
| 360 'xcode_settings': { | 359 'xcode_settings': { |
| 361 'ALWAYS_SEARCH_USER_PATHS': 'NO', | 360 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
| 362 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', | 361 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', |
| 362 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ |
| 363 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks | 363 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
| 364 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic | 364 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 365 # (Equivalent to -fPIC) | 365 # (Equivalent to -fPIC) |
| 366 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions | 366 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 367 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti | 367 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 368 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings | 368 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
| 369 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden | 369 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 370 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', | 370 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
| 371 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | 371 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 372 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror | 372 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 373 'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor | 373 'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor |
| 374 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min |
| 374 'SYMROOT': '<(DEPTH)/xcodebuild', | 375 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 375 'USE_HEADERMAP': 'NO', | 376 'USE_HEADERMAP': 'NO', |
| 376 'OTHER_CFLAGS': [ | 377 'OTHER_CFLAGS': [ |
| 377 '-fno-strict-aliasing', | 378 '-fno-strict-aliasing', |
| 378 ], | 379 ], |
| 379 'WARNING_CFLAGS': [ | 380 'WARNING_CFLAGS': [ |
| 380 '-Wall', | 381 '-Wall', |
| 381 '-Wendif-labels', | 382 '-Werror', |
| 382 '-W', | 383 '-Wextra', |
| 383 '-Wno-unused-parameter', | 384 '-Wno-unused-parameter', |
| 384 ], | 385 ], |
| 385 }, | 386 }, |
| 386 'variables': { | 387 'variables': { |
| 388 'chromium_code%': '<(chromium_code)', |
| 387 'clang_warning_flags': [ | 389 'clang_warning_flags': [ |
| 388 # TODO(thakis): https://crbug.com/604888 | 390 # TODO(thakis): https://crbug.com/604888 |
| 389 '-Wno-undefined-var-template', | 391 '-Wno-undefined-var-template', |
| 390 ], | 392 ], |
| 391 }, | 393 }, |
| 392 'includes': [ 'set_clang_warning_flags.gypi', ], | 394 'includes': [ 'set_clang_warning_flags.gypi', ], |
| 393 'conditions': [ | 395 'conditions': [ |
| 394 ['component=="shared_library"', { | 396 ['component=="shared_library"', { |
| 395 'cflags': [ | 397 'cflags': [ |
| 396 '-fPIC', | 398 '-fPIC', |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 }], # v8_use_external_startup_data==1 | 464 }], # v8_use_external_startup_data==1 |
| 463 ['clang==1 or host_clang==1', { | 465 ['clang==1 or host_clang==1', { |
| 464 # This is here so that all files get recompiled after a clang roll and | 466 # This is here so that all files get recompiled after a clang roll and |
| 465 # when turning clang on or off. | 467 # when turning clang on or off. |
| 466 # (defines are passed via the command line, and build systems rebuild | 468 # (defines are passed via the command line, and build systems rebuild |
| 467 # things when their commandline changes). Nothing should ever read this | 469 # things when their commandline changes). Nothing should ever read this |
| 468 # define. | 470 # define. |
| 469 'defines': ['CR_CLANG_REVISION=<!(python <(DEPTH)/tools/clang/scripts/up
date.py --print-revision)'], | 471 'defines': ['CR_CLANG_REVISION=<!(python <(DEPTH)/tools/clang/scripts/up
date.py --print-revision)'], |
| 470 }], | 472 }], |
| 471 ], | 473 ], |
| 474 'target_conditions': [ |
| 475 ['chromium_code==0', { |
| 476 'variables': { |
| 477 'clang_warning_flags': [ |
| 478 # Suppress unused variable warnings from third-party libraries. |
| 479 '-Wno-unused-variable', |
| 480 ], |
| 481 }, |
| 482 'msvs_settings': { |
| 483 'VCCLCompilerTool': { |
| 484 'WarningLevel': '3', |
| 485 }, |
| 486 }, |
| 487 'conditions': [ |
| 488 ['OS!="win"', { |
| 489 # Remove -Wextra for third-party code. |
| 490 'cflags!': [ '-Wextra' ], |
| 491 }], |
| 492 ['OS!="win" and clang==0', { |
| 493 'cflags!': [ |
| 494 '-Wall', |
| 495 ], |
| 496 }], |
| 497 ['OS=="mac"', { |
| 498 'xcode_settings': { |
| 499 'WARNING_CFLAGS!': ['-Wextra'], |
| 500 }, |
| 501 }], |
| 502 ], |
| 503 }, { # chromium_code==1 |
| 504 'msvs_settings': { |
| 505 'VCCLCompilerTool': { |
| 506 'WarningLevel': '4', |
| 507 }, |
| 508 }, |
| 509 }], |
| 510 ], # target_conditions for 'target_defaults' |
| 472 }, | 511 }, |
| 473 'conditions': [ | 512 'conditions': [ |
| 474 ['OS=="linux" or OS=="mac"', { | 513 ['OS=="linux" or OS=="mac"', { |
| 475 'conditions': [ | 514 'conditions': [ |
| 476 ['clang==1', { | 515 ['clang==1', { |
| 477 'make_global_settings': [ | 516 'make_global_settings': [ |
| 478 ['CC', '<(clang_dir)/bin/clang'], | 517 ['CC', '<(clang_dir)/bin/clang'], |
| 479 ['CXX', '<(clang_dir)/bin/clang++'], | 518 ['CXX', '<(clang_dir)/bin/clang++'], |
| 480 ], | 519 ], |
| 481 }], | 520 }], |
| 482 ], | 521 ], |
| 483 }], # OS=="linux" or OS=="mac" | 522 }], # OS=="linux" or OS=="mac" |
| 484 ['OS=="win"', { | 523 ['OS=="win"', { |
| 485 'conditions': [ | 524 'conditions': [ |
| 486 ['clang==1', { | 525 ['clang==1', { |
| 487 'make_global_settings': [ | 526 'make_global_settings': [ |
| 488 ['CC', '<(clang_dir)/bin/clang-cl'], | 527 ['CC', '<(clang_dir)/bin/clang-cl'], |
| 489 ], | 528 ], |
| 490 }], | 529 }], |
| 491 ], | 530 ], |
| 492 }], # OS=="win" | 531 }], # OS=="win" |
| 493 ["use_goma==1", { | 532 ["use_goma==1", { |
| 494 'make_global_settings': [ | 533 'make_global_settings': [ |
| 495 ['CC_wrapper', '<(gomadir)/gomacc'], | 534 ['CC_wrapper', '<(gomadir)/gomacc'], |
| 496 ['CXX_wrapper', '<(gomadir)/gomacc'], | 535 ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 497 ], | 536 ], |
| 498 }], # use_goma==1 | 537 }], # use_goma==1 |
| 499 ], | 538 ], |
| 500 } | 539 } |
| OLD | NEW |