Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: BUILD.gn

Issue 2011303003: Match GN and GYP compilation warning flags (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build_gyp/standalone.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium 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 import("//build_overrides/v8.gni") 5 import("//build_overrides/v8.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 import("pdfium.gni") 7 import("pdfium.gni")
8 8
9 config("pdfium_config") { 9 config("pdfium_config") {
10 cflags = [] 10 cflags = []
(...skipping 26 matching lines...) Expand all
37 defines += [ "_FX_CPU_=_FX_X64_" ] 37 defines += [ "_FX_CPU_=_FX_X64_" ]
38 cflags += [ "-fPIC" ] 38 cflags += [ "-fPIC" ]
39 } else if (current_cpu == "x86") { 39 } else if (current_cpu == "x86") {
40 defines += [ "_FX_CPU_=_FX_X86_" ] 40 defines += [ "_FX_CPU_=_FX_X86_" ]
41 } 41 }
42 } 42 }
43 43
44 if (is_win) { 44 if (is_win) {
45 cflags += [ "/wd4267" ] 45 cflags += [ "/wd4267" ]
46 } 46 }
47 }
47 48
48 if (is_clang || is_posix) { 49 config("xfa_warnings") {
49 # TODO(thestig): Fix all instances, remove this, pdfium:29 50 visibility = [ ":*" ]
50 cflags += [ "-Wno-sign-compare" ]
51 }
52
53 if (is_posix && !is_clang) { # When GCC. 51 if (is_posix && !is_clang) { # When GCC.
54 cflags += [ "-Wno-strict-overflow" ] 52 cflags = [ "-Wno-strict-overflow" ]
55 } 53 }
56 } 54 }
57 55
58 static_library("pdfium") { 56 static_library("pdfium") {
59 sources = [ 57 sources = [
60 "fpdfsdk/cfx_systemhandler.cpp", 58 "fpdfsdk/cfx_systemhandler.cpp",
61 "fpdfsdk/cfx_systemhandler.h", 59 "fpdfsdk/cfx_systemhandler.h",
62 "fpdfsdk/fpdf_dataavail.cpp", 60 "fpdfsdk/fpdf_dataavail.cpp",
63 "fpdfsdk/fpdf_ext.cpp", 61 "fpdfsdk/fpdf_ext.cpp",
64 "fpdfsdk/fpdf_flatten.cpp", 62 "fpdfsdk/fpdf_flatten.cpp",
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 "fpdfsdk/fpdfxfa/fpdfxfa_page.cpp", 879 "fpdfsdk/fpdfxfa/fpdfxfa_page.cpp",
882 "fpdfsdk/fpdfxfa/fpdfxfa_util.cpp", 880 "fpdfsdk/fpdfxfa/fpdfxfa_util.cpp",
883 "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h", 881 "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h",
884 "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h", 882 "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h",
885 "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h", 883 "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h",
886 "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h", 884 "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h",
887 ] 885 ]
888 deps = [ 886 deps = [
889 ":xfa", 887 ":xfa",
890 ] 888 ]
891 configs -= [ "//build/config/compiler:chromium_code" ] 889 configs += [ ":pdfium_config" ]
892 configs += [
893 ":pdfium_config",
894 "//build/config/compiler:no_chromium_code",
895 ]
896 } 890 }
897 891
898 static_library("xfa") { 892 static_library("xfa") {
899 sources = [ 893 sources = [
900 "xfa/fde/cfde_path.cpp", 894 "xfa/fde/cfde_path.cpp",
901 "xfa/fde/cfde_path.h", 895 "xfa/fde/cfde_path.h",
902 "xfa/fde/cfde_txtedtbuf.cpp", 896 "xfa/fde/cfde_txtedtbuf.cpp",
903 "xfa/fde/cfde_txtedtbuf.h", 897 "xfa/fde/cfde_txtedtbuf.h",
904 "xfa/fde/cfde_txtedtbufiter.cpp", 898 "xfa/fde/cfde_txtedtbufiter.cpp",
905 "xfa/fde/cfde_txtedtbufiter.h", 899 "xfa/fde/cfde_txtedtbufiter.h",
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 "//v8", 1580 "//v8",
1587 "//v8/include", 1581 "//v8/include",
1588 ] 1582 ]
1589 public_deps = [ 1583 public_deps = [
1590 "//v8", 1584 "//v8",
1591 ] 1585 ]
1592 deps = [ 1586 deps = [
1593 "//v8:v8_libplatform", 1587 "//v8:v8_libplatform",
1594 ] 1588 ]
1595 } 1589 }
1596 configs -= [ "//build/config/compiler:chromium_code" ]
1597 configs += [ 1590 configs += [
1598 ":pdfium_config", 1591 ":pdfium_config",
1599 "//build/config/compiler:no_chromium_code", 1592 ":xfa_warnings",
1600 ] 1593 ]
1601 } 1594 }
1602 } 1595 }
1603 1596
1604 test("pdfium_unittests") { 1597 test("pdfium_unittests") {
1605 sources = [ 1598 sources = [
1606 "core/fpdfapi/fpdf_font/fpdf_font_cid_unittest.cpp", 1599 "core/fpdfapi/fpdf_font/fpdf_font_cid_unittest.cpp",
1607 "core/fpdfapi/fpdf_font/fpdf_font_unittest.cpp", 1600 "core/fpdfapi/fpdf_font/fpdf_font_unittest.cpp",
1608 "core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp", 1601 "core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp",
1609 "core/fpdfapi/fpdf_page/fpdf_page_parser_unittest.cpp", 1602 "core/fpdfapi/fpdf_page/fpdf_page_parser_unittest.cpp",
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 } 1700 }
1708 1701
1709 if (pdf_is_standalone) { 1702 if (pdf_is_standalone) {
1710 source_set("samples") { 1703 source_set("samples") {
1711 testonly = true 1704 testonly = true
1712 deps = [ 1705 deps = [
1713 "//samples", 1706 "//samples",
1714 ] 1707 ]
1715 } 1708 }
1716 } 1709 }
OLDNEW
« no previous file with comments | « no previous file | build_gyp/standalone.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698