Skip to content

Commit

Permalink
Restore Cobalt customizations
Browse files Browse the repository at this point in the history
b/283570016
  • Loading branch information
dahlstrom-g committed Jun 27, 2023
1 parent 9b61244 commit 2024e6c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions third_party/libxml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

# Define an "os_include" variable that points at the OS-specific generated
# headers. These were generated by running the configure script offline.
if (use_cobalt_customizations) {
os_include = "starboard"
} else
if (is_linux || is_chromeos || is_android || is_nacl || is_fuchsia) {
os_include = "linux"
} else if (is_apple) {
Expand Down Expand Up @@ -66,6 +69,12 @@ config("libxml_warnings") {
# TODO(hans): See if we can fix upstream (http://crbug.com/763944).
"-Wno-enum-compare",
]
if (is_clang_16 && use_cobalt_customizations) {
cflags += [
# xmlschemas.c variable 'count' set but not used
"-Wno-unused-but-set-variable",
]
}
} else if (is_linux || is_chromeos) {
cflags = [
# gcc spits out a bunch of warnings about passing too many arguments to
Expand All @@ -75,6 +84,7 @@ config("libxml_warnings") {
}
}

if (!use_cobalt_customizations) { # exclude libraries "xml_reader" and "xml_writer"
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
Expand Down Expand Up @@ -111,6 +121,7 @@ static_library("xml_writer") {
]
configs += [ ":libxml_config" ]
}
} # exclude libraries "xml_reader" and "xml_writer"

static_library("libxml_utils") {
# Do not expand this visibility list without first consulting with the
Expand Down Expand Up @@ -144,6 +155,15 @@ static_library("libxml") {
"//third_party/libxslt",
"//third_party/maldoca/*",
]
if (use_cobalt_customizations) {
visibility += [
"//base/test:test_support",
"//cobalt/base",
"//cobalt/dom_parser",
"//cobalt/renderer/rasterizer/skia/skia",
"//components/update_client",
]
}
if (is_ios) {
foreach(tgt, ios_libxml_visibility_additions) {
visibility += [ "//ios_internal/$tgt" ]
Expand Down Expand Up @@ -275,7 +295,9 @@ static_library("libxml") {
"src/xzlib.h",
]

if (!use_cobalt_customizations) {
configs -= [ "//build/config/compiler:chromium_code" ]
}
configs += [
"//build/config/compiler:no_chromium_code",

Expand Down

0 comments on commit 2024e6c

Please sign in to comment.