crashpad/build/BUILDCONFIG.gn
Scott Graham 457cc6a34f gn: Refactor build files to avoid build/secondary
In doing standalone bringup of Crashpad targeting Fuchsia, it seemed
tidy to keep the same literal paths to the dependencies that Chromium
needed and add stubs/forwarding to build/secondary in the Crashpad tree
as required to make those work.

However, when trying to build Crashpad in the Fuchsia tree itself, that
would require adding forwarding files to the Fuchsia tree to match the
Chromium directory structure, which would be awkward. Instead, have
explicit dependencies in the Crashpad tree that select the locations
for various dependencies.

Bug: crashpad:79, crashpad:196
Change-Id: Ib506839f9c97d8ef823663cdc733cbdcfa126139
Reviewed-on: https://chromium-review.googlesource.com/826025
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-12-18 22:53:58 +00:00

95 lines
2.2 KiB
Plaintext

# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if (target_os == "") {
target_os = host_os
}
if (current_os == "") {
current_os = target_os
}
if (target_cpu == "") {
target_cpu = host_cpu
}
if (current_cpu == "") {
current_cpu = target_cpu
}
declare_args() {
is_debug = false
is_clang = current_os == "mac" || current_os == "fuchsia"
clang_root = ""
}
is_mac = false
is_win = false
is_linux = false
is_android = false
is_fuchsia = false
if (current_os == "mac") {
is_mac = true
} else if (current_os == "win") {
is_win = true
} else if (current_os == "android") {
is_android = true
} else if (current_os == "linux") {
is_linux = true
} else if (current_os == "fuchsia") {
is_fuchsia = true
}
is_posix = is_mac || is_linux || is_android || is_fuchsia
if (is_win) {
set_default_toolchain(
"//third_party/mini_chromium/mini_chromium/build:msvc_toolchain")
} else {
set_default_toolchain(
"//third_party/mini_chromium/mini_chromium/build:gcc_like_toolchain")
}
default_configs = [
"//third_party/mini_chromium/mini_chromium/build:default",
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
set_defaults("source_set") {
configs = default_configs
}
set_defaults("static_library") {
configs = default_configs
}
set_defaults("executable") {
configs = default_configs
}
set_defaults("loadable_module") {
configs = default_configs
}
set_defaults("shared_library") {
configs = default_configs
}
# These are set to constant values for Chromium build file compatibility. This
# generally avoids extra explicit checking of whether or not Crashpad is
# building in Chromium mode or not.
is_ios = false
is_component_build = false