Skip to content

Commit ec42b14

Browse files
timvpGoogleCommit Bot
authored andcommitted
Check angle_enable_abseil in Abseil group and config
The contents of the group angle_abseil and config angle_abseil_config needs to be underneath a check of angle_enable_abseil, so we don't erroneously attempt to access Abseil files when Abseil is disabled (like when building ANGLE in Skia). Bug: angleproject:4873 Bug: skia:7647 Test: CQ Test: Manual verification of Skia 'gn gen' on Windows Change-Id: I587da0edb66be8c422ae4e7f9d7ed0461749179a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2435898 Commit-Queue: Jamie Madill <[email protected]> Reviewed-by: Jamie Madill <[email protected]>
1 parent 6e36029 commit ec42b14

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

BUILD.gn

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -758,24 +758,28 @@ if (!defined(angle_abseil_cpp_dir)) {
758758
}
759759

760760
config("angle_abseil_config") {
761-
defines = [ "ANGLE_USE_ABSEIL" ]
761+
if (angle_enable_abseil) {
762+
defines = [ "ANGLE_USE_ABSEIL" ]
762763

763-
configs = [
764-
"$angle_abseil_cpp_dir:absl_define_config",
765-
"$angle_abseil_cpp_dir:absl_include_config",
766-
]
764+
configs = [
765+
"$angle_abseil_cpp_dir:absl_define_config",
766+
"$angle_abseil_cpp_dir:absl_include_config",
767+
]
768+
}
767769
}
768770

769771
group("angle_abseil") {
770-
# When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while
771-
# we can be more specific when building standalone ANGLE.
772-
if (build_with_chromium) {
773-
public_deps = [ "$angle_abseil_cpp_dir:absl" ]
774-
} else {
775-
public_deps = [ "$angle_abseil_cpp_dir/absl/container:flat_hash_map" ]
776-
}
772+
if (angle_enable_abseil) {
773+
# When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while
774+
# we can be more specific when building standalone ANGLE.
775+
if (build_with_chromium) {
776+
public_deps = [ "$angle_abseil_cpp_dir:absl" ]
777+
} else {
778+
public_deps = [ "$angle_abseil_cpp_dir/absl/container:flat_hash_map" ]
779+
}
777780

778-
public_configs = [ ":angle_abseil_config" ]
781+
public_configs = [ ":angle_abseil_config" ]
782+
}
779783
}
780784

781785
config("angle_compression_config") {

0 commit comments

Comments
 (0)