From 91e949292f5944020365ab8b5a44a9c940cb3b69 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 26 Mar 2019 17:16:28 +0000 Subject: [PATCH] BUILD.gn: put public include dirs in all_dependent_configs The public include dirs for Dawn were in the dawn_public config but it would only be added to targets as a part of public_configs. This meant that second-level dependencies that ended up needing to include dawn/dawn.h wouldn't know where to find it. Fixed this by adding include dirs in all_dependent_configs and renamed the config to be very explicit that it is for include dirs only. BUG=chromium:938895 Change-Id: Iad70f3ce1f8a02b96bf341e7dd7d6068ce645af7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5920 Reviewed-by: Austin Eng Reviewed-by: Kai Ninomiya Commit-Queue: Corentin Wallez --- BUILD.gn | 2 +- src/common/BUILD.gn | 8 +++----- src/dawn/BUILD.gn | 2 +- src/dawn_wire/BUILD.gn | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index ac84461540..196cfe295c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -50,7 +50,7 @@ source_set("libdawn_native_headers") { public_deps = [ "${dawn_root}/src/dawn:dawn_headers", ] - public_configs = [ "${dawn_root}/src/common:dawn_public" ] + all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ] sources = [ "src/include/dawn_native/DawnNative.h", "src/include/dawn_native/dawn_native_export.h", diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index 58b60f28f2..eb7dcc96e1 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -29,10 +29,10 @@ if (build_with_chromium) { # Common dawn configs ############################################################################### -config("dawn_public") { +config("dawn_public_include_dirs") { include_dirs = [ "${target_gen_dir}/../..", - "${dawn_root}/src/include" + "${dawn_root}/src/include", ] } @@ -60,8 +60,6 @@ config("dawn_internal") { defines += [ "DAWN_ENABLE_BACKEND_VULKAN" ] } - configs = [ ":dawn_public" ] - # Only internal Dawn targets can use this config, this means only targets in # this BUILD.gn file. visibility = [ ":*" ] @@ -96,7 +94,7 @@ if (is_win || is_linux || is_mac) { "vulkan_platform.h", "windows_with_undefs.h", ] - + configs += [ ":dawn_internal" ] deps = [ "${dawn_root}/src/dawn:dawn_headers", diff --git a/src/dawn/BUILD.gn b/src/dawn/BUILD.gn index b2fc3b1866..f94344d94d 100644 --- a/src/dawn/BUILD.gn +++ b/src/dawn/BUILD.gn @@ -35,7 +35,7 @@ dawn_generator("dawn_headers_gen") { } source_set("dawn_headers") { - public_configs = [ "${dawn_root}/src/common:dawn_public" ] + all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ] deps = [ ":dawn_headers_gen", ] diff --git a/src/dawn_wire/BUILD.gn b/src/dawn_wire/BUILD.gn index 14c7ca3277..c6a6618be1 100644 --- a/src/dawn_wire/BUILD.gn +++ b/src/dawn_wire/BUILD.gn @@ -27,7 +27,7 @@ source_set("libdawn_wire_headers") { public_deps = [ "${dawn_root}/src/dawn:dawn_headers", ] - public_configs = [ "${dawn_root}/src/common:dawn_public" ] + all_dependent_configs = [ "${dawn_root}/src/common:dawn_public_include_dirs" ] sources = [ "${dawn_root}/src/include/dawn_wire/Wire.h", "${dawn_root}/src/include/dawn_wire/WireClient.h",