fuchsia: Support referencing the Fuchsia tree's third_party/zlib

This renames the "chromium" configuration of zlib to "external". What it
really means is that zlib lives in //third_party/zlib, which happens to
be where both Chromium and Fuchsia put it, with moderately similar build
files.

Bug: crashpad:79, crashpad:196
Change-Id: I380c106ec1f97471b2354166f5cf92885196e1b8
Reviewed-on: https://chromium-review.googlesource.com/833095
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2017-12-18 16:41:20 -08:00 committed by Commit Bot
parent 1bc07b76ed
commit a0bd3fee55
2 changed files with 6 additions and 6 deletions

View File

@ -14,8 +14,8 @@
import("../../build/crashpad_dependencies.gni") import("../../build/crashpad_dependencies.gni")
if (crashpad_is_in_chromium) { if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
zlib_source = "chromium" zlib_source = "external"
} else if (!is_win && !is_fuchsia) { } else if (!is_win && !is_fuchsia) {
zlib_source = "system" zlib_source = "system"
} else { } else {
@ -23,8 +23,8 @@ if (crashpad_is_in_chromium) {
} }
config("zlib_config") { config("zlib_config") {
if (zlib_source == "chromium") { if (zlib_source == "external") {
defines = [ "CRASHPAD_ZLIB_SOURCE_CHROMIUM" ] defines = [ "CRASHPAD_ZLIB_SOURCE_EXTERNAL" ]
} else if (zlib_source == "system") { } else if (zlib_source == "system") {
defines = [ "CRASHPAD_ZLIB_SOURCE_SYSTEM" ] defines = [ "CRASHPAD_ZLIB_SOURCE_SYSTEM" ]
} else if (zlib_source == "embedded") { } else if (zlib_source == "embedded") {
@ -33,7 +33,7 @@ config("zlib_config") {
} }
} }
if (zlib_source == "chromium") { if (zlib_source == "external") {
group("zlib") { group("zlib") {
public_configs = [ ":zlib_config" ] public_configs = [ ":zlib_config" ]
public_deps = [ public_deps = [

View File

@ -19,7 +19,7 @@
// available at any other location in the source tree. It will #include the // available at any other location in the source tree. It will #include the
// proper <zlib.h> depending on how the build has been configured. // proper <zlib.h> depending on how the build has been configured.
#if defined(CRASHPAD_ZLIB_SOURCE_CHROMIUM) #if defined(CRASHPAD_ZLIB_SOURCE_EXTERNAL)
#include "third_party/zlib/zlib.h" #include "third_party/zlib/zlib.h"
#elif defined(CRASHPAD_ZLIB_SOURCE_SYSTEM) #elif defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
#include <zlib.h> #include <zlib.h>