Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: gpu/vulkan/BUILD.gn

Issue 2744973002: Remove enable_vulkan from build/config, and move it to the buildflag_header system. (Closed)
Patch Set: awww year Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/BUILD.gn ('k') | gpu/vulkan/features.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/BUILD.gn
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn
index 39ed1e066822ed9cf657bb46ecc84e2de310d77d..b738725ebee29af049206da3c075758d259090e7 100644
--- a/gpu/vulkan/BUILD.gn
+++ b/gpu/vulkan/BUILD.gn
@@ -2,13 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/ui.gni")
+import("features.gni")
+import("//build/buildflag_header.gni")
import("//testing/test.gni")
-config("vulkan_config") {
- defines = [ "ENABLE_VULKAN" ]
+# Generate a buildflag header for compile-time checking of Vulkan support.
+buildflag_header("features") {
+ header = "features.h"
+ flags = [ "ENABLE_VULKAN=$enable_vulkan" ]
}
-
if (enable_vulkan) {
vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib"
component("vulkan") {
@@ -50,10 +52,7 @@ if (enable_vulkan) {
configs += [ "//build/config:precompiled_headers" ]
defines = [ "VULKAN_IMPLEMENTATION" ]
- all_dependent_configs = [
- ":vulkan_config",
- "//third_party/vulkan:vulkan_headers",
- ]
+ all_dependent_configs = [ "//third_party/vulkan:vulkan_headers" ]
libs = [ "vulkan" ]
if (current_cpu == "x64") {
« no previous file with comments | « content/gpu/BUILD.gn ('k') | gpu/vulkan/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698