Commit 32c051ee authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

Move the "atspi2" target to a separate BUILD.gn file

//build/config/linux/BUILD.gn is read by //build/config/compiler/BUILD.gn,
which means it is processed by both host and target toolchains.

Consequently, having the "atspi2" target there means "gn gen" can fail
because the host lacks atspi-2's development files even though they are only
needed by the target toolchain during the build.

Bug: 879147
Change-Id: I8780e6e4d3a2b3a44fdb2cbbb0862a1a669acdaa
Reviewed-on: https://chromium-review.googlesource.com/c/1356979Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#612831}
parent d21d2ed3
...@@ -100,26 +100,6 @@ if (use_glib) { ...@@ -100,26 +100,6 @@ if (use_glib) {
} }
} }
if (use_atk) {
pkg_config("atspi2") {
packages = [ "atspi-2" ]
atspi_version = exec_script(pkg_config_script,
pkg_config_args + [
"atspi-2",
"--version-as-components",
],
"value")
atspi_major_version = atspi_version[0]
atspi_minor_version = atspi_version[1]
atspi_micro_version = atspi_version[2]
defines = [
"ATSPI_MAJOR_VERSION=$atspi_major_version",
"ATSPI_MINOR_VERSION=$atspi_minor_version",
"ATSPI_MICRO_VERSION=$atspi_micro_version",
]
}
}
# Ensures all exported symbols are added to the dynamic symbol table. This is # Ensures all exported symbols are added to the dynamic symbol table. This is
# necessary to expose Chrome's custom operator new() and operator delete() (and # necessary to expose Chrome's custom operator new() and operator delete() (and
# other memory-related symbols) to libraries. Otherwise, they might # other memory-related symbols) to libraries. Otherwise, they might
......
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni")
# These packages should _only_ be expected when building for a target.
assert(current_toolchain == default_toolchain)
if (use_atk) {
pkg_config("atspi2") {
packages = [ "atspi-2" ]
atspi_version = exec_script(pkg_config_script,
pkg_config_args + [
"atspi-2",
"--version-as-components",
],
"value")
atspi_major_version = atspi_version[0]
atspi_minor_version = atspi_version[1]
atspi_micro_version = atspi_version[2]
defines = [
"ATSPI_MAJOR_VERSION=$atspi_major_version",
"ATSPI_MINOR_VERSION=$atspi_minor_version",
"ATSPI_MICRO_VERSION=$atspi_micro_version",
]
}
}
...@@ -17,6 +17,7 @@ build_dotfile_settings = { ...@@ -17,6 +17,7 @@ build_dotfile_settings = {
"//build/config/linux/BUILD.gn", "//build/config/linux/BUILD.gn",
"//build/config/linux/pkg_config.gni", "//build/config/linux/pkg_config.gni",
"//build/config/linux/atk/BUILD.gn", "//build/config/linux/atk/BUILD.gn",
"//build/config/linux/atspi2/BUILD.gn",
"//build/config/linux/dri/BUILD.gn", "//build/config/linux/dri/BUILD.gn",
"//build/config/mac/mac_sdk.gni", "//build/config/mac/mac_sdk.gni",
"//build/config/mac/rules.gni", "//build/config/mac/rules.gni",
......
...@@ -2167,7 +2167,7 @@ jumbo_source_set("browser") { ...@@ -2167,7 +2167,7 @@ jumbo_source_set("browser") {
configs += [ configs += [
"//build/config/linux/atk", "//build/config/linux/atk",
"//build/config/linux:atspi2", "//build/config/linux/atspi2",
] ]
if (use_glib) { if (use_glib) {
......
...@@ -431,7 +431,7 @@ jumbo_static_library("test_support") { ...@@ -431,7 +431,7 @@ jumbo_static_library("test_support") {
[ "../browser/accessibility/accessibility_event_recorder_auralinux.cc" ] [ "../browser/accessibility/accessibility_event_recorder_auralinux.cc" ]
configs += [ configs += [
"//build/config/linux/atk", "//build/config/linux/atk",
"//build/config/linux:atspi2", "//build/config/linux/atspi2",
] ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment