Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nickdiego/97c7db30d80487cd48b1727defabcdd7 to your computer and use it in GitHub Desktop.

Select an option

Save nickdiego/97c7db30d80487cd48b1727defabcdd7 to your computer and use it in GitHub Desktop.
From 5fbc959e8da5291d01d6a0ba53d5acfec0420193 Mon Sep 17 00:00:00 2001
From: Nick Diego Yamane <nickdiego@igalia.com>
Date: Wed, 5 Feb 2020 02:09:02 -0400
Subject: [PATCH] weston: build: Drop cflags_c in favor of config+cflags
---
third_party/weston/BUILD.gn | 52 ++++++++++++-------------------------
1 file changed, 17 insertions(+), 35 deletions(-)
diff --git third_party/weston/BUILD.gn third_party/weston/BUILD.gn
index 7de6e9d99b97..e58fee673331 100644
--- third_party/weston/BUILD.gn
+++ third_party/weston/BUILD.gn
@@ -49,6 +49,15 @@ config("weston_config") {
"version",
"include",
]
+
+ cflags = [
+ "-Wno-extra-semi",
+ "-Wno-implicit-function-declaration",
+ "-Wno-int-conversion",
+ "-Wno-return-type",
+ "-Wno-shift-negative-value",
+ "-Wno-string-conversion",
+ ]
}
pkg_config("pixman") {
@@ -84,11 +93,9 @@ static_library("shared") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
]
-
- cflags_c = [ "-Wno-return-type" ]
}
static_library("cairo_shared") {
@@ -121,12 +128,6 @@ static_library("cairo_shared") {
}
static_library("libweston") {
- cflags_c = [
- "-Wno-string-conversion",
- "-Wno-implicit-function-declaration",
- "-Wno-shift-negative-value",
- ]
-
sources = [
"src/libweston/animation.c",
"src/libweston/bindings.c",
@@ -179,8 +180,8 @@ static_library("libweston") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
":xkbcommon",
]
@@ -193,11 +194,6 @@ shared_library("gl_renderer") {
visibility = [ ":weston" ]
- cflags_c = [
- "-Wno-int-conversion",
- "-Wno-return-type",
- ]
-
#gl_renderer currently requires files under src/liweston and src/shared to
#include at runtime, if we remove these files some of the components(functions)
#are undefined and lead to failure in build due to undefined symbols/functions
@@ -225,8 +221,8 @@ shared_library("gl_renderer") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
":xkbcommon",
]
}
@@ -331,11 +327,6 @@ static_library("libweston_desktop") {
shared_library("compositor") {
output_name = "weston_compositor"
- cflags_c = [
- "-Wno-string-conversion",
- "-Wno-implicit-function-declaration",
- ]
-
include_dirs = [ "src/shared" ]
sources = [
@@ -354,8 +345,8 @@ shared_library("compositor") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
]
public_configs = [
@@ -365,8 +356,6 @@ shared_library("compositor") {
}
static_library("toytoolkit") {
- cflags_c = [ "-Wno-string-conversion" ]
-
sources = [ "src/clients/window.c" ]
deps = [
@@ -380,9 +369,9 @@ static_library("toytoolkit") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
- ":wayland_cursor",
"//build/config/compiler:no_chromium_code",
+ ":wayland_cursor",
+ ":weston_config",
":xkbcommon",
]
}
@@ -433,8 +422,6 @@ executable("weston_desktop_shell") {
visibility = [ ":weston" ]
- cflags_c = [ "-Wno-string-conversion" ]
-
sources = [ "src/clients/desktop-shell.c" ]
deps = [
@@ -445,8 +432,8 @@ executable("weston_desktop_shell") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
]
}
@@ -456,11 +443,6 @@ shared_library("desktop_shell") {
visibility = [ ":weston" ]
- cflags_c = [
- "-Wno-extra-semi",
- "-Wno-string-conversion",
- ]
-
sources = [
"src/desktop-shell/exposay.c",
"src/desktop-shell/input-panel.c",
@@ -478,8 +460,8 @@ shared_library("desktop_shell") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- ":weston_config",
"//build/config/compiler:no_chromium_code",
+ ":weston_config",
]
}
--
2.25.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment