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

Unified Diff: third_party/mesa/BUILD.gn

Issue 1473273002: GN(Android): Add libosmesa.so to ContentShell.apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years 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/shell/android/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mesa/BUILD.gn
diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn
index 73be8e665038686ab14cc3a31b43834cec4023ab..6ae815dd3d36e4c6a5e300918839e9a5e4421be5 100644
--- a/third_party/mesa/BUILD.gn
+++ b/third_party/mesa/BUILD.gn
@@ -676,68 +676,59 @@ static_library("mesa") {
]
}
-if (!is_android) { # TODO(GYP) enable for Android.
- # Building this target will hide the native OpenGL shared library and
- # replace it with a slow software renderer.
- #
- # Note: on x64 Windows this target gives warnings to the effect of:
- # osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified
- # multiple times; using first specification
- # This also happens with the GYP build.
- loadable_module("osmesa") {
- sources = [
- "src/src/mesa/drivers/common/driverfuncs.c",
- "src/src/mesa/drivers/common/driverfuncs.h",
- "src/src/mesa/drivers/common/meta.c",
- "src/src/mesa/drivers/common/meta.h",
- "src/src/mesa/drivers/osmesa/osmesa.c",
- ]
+# Building this target will hide the native OpenGL shared library and
+# replace it with a slow software renderer.
+#
+# Note: on x64 Windows this target gives warnings to the effect of:
+# osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified
+# multiple times; using first specification
+# This also happens with the GYP build.
+loadable_module("osmesa") {
+ sources = [
+ "src/src/mesa/drivers/common/driverfuncs.c",
+ "src/src/mesa/drivers/common/driverfuncs.h",
+ "src/src/mesa/drivers/common/meta.c",
+ "src/src/mesa/drivers/common/meta.h",
+ "src/src/mesa/drivers/osmesa/osmesa.c",
+ ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- ":mesa_headers_config",
- "//build/config/compiler:no_chromium_code",
- ]
- previous_configs = configs
- configs = []
- configs = [ ":mesa_internal_config" ] + previous_configs +
- [ ":mesa_internal_warnings" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":mesa_headers_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ previous_configs = configs
+ configs = []
+ configs = [ ":mesa_internal_config" ] + previous_configs +
+ [ ":mesa_internal_warnings" ]
- include_dirs = [ "src/src/mesa/drivers" ]
+ include_dirs = [ "src/src/mesa/drivers" ]
- if (is_clang) {
- # Mesa triggers some of these Clang warnings.
- configs -= [ "//build/config/clang:extra_warnings" ]
- }
+ if (is_clang) {
+ # Mesa triggers some of these Clang warnings.
+ configs -= [ "//build/config/clang:extra_warnings" ]
+ }
- if (is_win) {
- ldflags =
- [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
- root_build_dir) ]
- }
+ if (is_win) {
+ ldflags = [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
+ root_build_dir) ]
+ }
- deps = [
- ":mesa",
- ":mesa_headers",
- ":mesa_libglslcommon",
- "//build/config/sanitizers:deps",
- ]
+ deps = [
+ ":mesa",
+ ":mesa_headers",
+ ":mesa_libglslcommon",
+ "//build/config/sanitizers:deps",
+ ]
- if (is_win) {
- defines = [
- "BUILD_GL32",
- "KEYWORD1=GLAPI",
- "KEYWORD2=GLAPIENTRY",
- ]
- }
- }
-} else {
- # Placeholder to allow targets to unconditionally depend on this.
- group("osmesa") {
+ if (is_win) {
+ defines = [
+ "BUILD_GL32",
+ "KEYWORD1=GLAPI",
+ "KEYWORD2=GLAPIENTRY",
+ ]
}
-} # !is_android
-
-# TODO(GYP) Android osmesa_in_lib_dir target.
+}
if (is_linux) {
config("wayland_drm_protocol_config") {
« no previous file with comments | « content/shell/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698