Fix XFA builds under chromium checkouts
authorTom Sepez <tsepez@chromium.org>
Fri, 19 Jun 2015 00:44:29 +0000 (17:44 -0700)
committerTom Sepez <tsepez@chromium.org>
Fri, 19 Jun 2015 00:44:29 +0000 (17:44 -0700)
This pulls in from origin/master:
94dd28e Update GN build files w/ cpu_arch -> current_cpu changes.
1e580a1 Fix multiply defined macro in zlib.h

Add a missing file to BUILD.gn dropped at 1ed8a21.

TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/1189133006.

BUILD.gn
core/src/fxcodec/fx_zlib/zlib_v128/zlib.h

index 0987216..d30faba 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -30,10 +30,10 @@ config("pdfium_config") {
   }
 
   if (is_linux) {
-    if (cpu_arch == "x64") {
+    if (current_cpu == "x64") {
       defines += [ "_FX_CPU_=_FX_X64_" ]
       cflags += [ "-fPIC" ]
-    } else if (cpu_arch == "x86") {
+    } else if (current_cpu == "x86") {
       defines += [ "_FX_CPU_=_FX_X86_" ]
     }
   }
@@ -55,27 +55,28 @@ static_library("pdfium") {
     "fpdfsdk/include/fsdk_annothandler.h",
     "fpdfsdk/include/fsdk_baseannot.h",
     "fpdfsdk/include/fsdk_baseform.h",
+    "fpdfsdk/src/fpdf_dataavail.cpp",
+    "fpdfsdk/src/fpdf_ext.cpp",
+    "fpdfsdk/src/fpdf_flatten.cpp",
+    "fpdfsdk/src/fpdf_progressive.cpp",
+    "fpdfsdk/src/fpdf_searchex.cpp",
+    "fpdfsdk/src/fpdf_sysfontinfo.cpp",
+    "fpdfsdk/src/fpdf_transformpage.cpp",
     "fpdfsdk/src/fpdfdoc.cpp",
     "fpdfsdk/src/fpdfeditimg.cpp",
     "fpdfsdk/src/fpdfeditpage.cpp",
     "fpdfsdk/src/fpdfformfill.cpp",
     "fpdfsdk/src/fpdfppo.cpp",
     "fpdfsdk/src/fpdfsave.cpp",
+    "fpdfsdk/src/fpdfsdkdll.rc",
     "fpdfsdk/src/fpdftext.cpp",
     "fpdfsdk/src/fpdfview.cpp",
-    "fpdfsdk/src/fpdf_dataavail.cpp",
-    "fpdfsdk/src/fpdf_ext.cpp",
-    "fpdfsdk/src/fpdf_flatten.cpp",
-    "fpdfsdk/src/fpdf_progressive.cpp",
-    "fpdfsdk/src/fpdf_searchex.cpp",
-    "fpdfsdk/src/fpdf_sysfontinfo.cpp",
     "fpdfsdk/src/fsdk_actionhandler.cpp",
     "fpdfsdk/src/fsdk_annothandler.cpp",
     "fpdfsdk/src/fsdk_baseannot.cpp",
     "fpdfsdk/src/fsdk_baseform.cpp",
     "fpdfsdk/src/fsdk_mgr.cpp",
     "fpdfsdk/src/fsdk_rendercontext.cpp",
-    "fpdfsdk/src/fpdfsdkdll.rc",
     "fpdfsdk/src/resource.h",
     "public/fpdf_dataavail.h",
     "public/fpdf_doc.h",
index 9eb5e3a..2d5812a 100644 (file)
@@ -1779,6 +1779,8 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
 #    define gzseek gzseek64
 #    define gztell gztell64
 #    define gzoffset gzoffset64
+#    undef adler32_combine
+#    undef crc32_combine
 #    define adler32_combine adler32_combine64
 #    define crc32_combine crc32_combine64
 #  endif