Commit 80c67edf authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Stop //third_party/libxml from using global filter for sources

set_sources_assignment_filter() is considered as a mis-feature
of gn (as it makes it difficult to reason about the BUILD.gn
files individually).

Change code in //third_party/libxml to check the platform before
adding plaform-specific source files to "sources" variable and
clear the filter to prevent regressions.

Bug: 1018739
Change-Id: Iba4ae10ec163ce8b7ba3774cd47ebba7ad92f29a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416350
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807987}
parent 4c42e3f9
......@@ -134,9 +134,9 @@ static_library("libxml") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
":libxml_utils",
":xml_reader",
":xml_writer",
":libxml_utils",
"//chromecast/internal",
"//testing/libfuzzer/*",
"//third_party/blink/renderer/*",
......@@ -154,11 +154,6 @@ static_library("libxml") {
# Commented out sources are libxml2 files we do not want to include. They are
# here to make it easy to identify files which are new.
sources = [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
"mac/config.h",
"mac/include/libxml/xmlversion.h",
#"src/DOCBparser.c",
"src/HTMLparser.c",
"src/HTMLtree.c",
......@@ -227,8 +222,6 @@ static_library("libxml") {
"src/include/libxml/xpath.h",
"src/include/libxml/xpathInternals.h",
"src/include/libxml/xpointer.h",
"src/include/win32config.h",
"src/include/wsockcompat.h",
#"src/legacy.c",
"src/libxml.h",
......@@ -279,8 +272,6 @@ static_library("libxml") {
#"src/xpointer.c",
#"src/xzlib.c",
"src/xzlib.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]
configs -= [ "//build/config/compiler:chromium_code" ]
......@@ -291,7 +282,28 @@ static_library("libxml") {
":libxml_warnings",
]
if (is_linux || is_chromeos) {
sources += [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
]
}
if (is_mac) {
sources += [
"mac/config.h",
"mac/include/libxml/xmlversion.h",
]
}
if (is_win) {
sources += [
"src/include/win32config.h",
"src/include/wsockcompat.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]
# libxml2 already defines WIN32_LEAN_AND_MEAN.
configs -= [ "//build/config/win:lean_and_mean" ]
}
......
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