diff options
author | agrieve <agrieve@chromium.org> | 2015-12-02 18:17:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-03 02:17:49 +0000 |
commit | da37b9ba5421dc03b28d507c2de7a422790a190a (patch) | |
tree | 503f8f69965a53885f0120008035a914363ddaff /third_party/mesa/BUILD.gn | |
parent | 9d92b83b5e1fbf6776aeb7e7e5438ae12c4c0aaf (diff) | |
download | chromium_src-da37b9ba5421dc03b28d507c2de7a422790a190a.zip chromium_src-da37b9ba5421dc03b28d507c2de7a422790a190a.tar.gz chromium_src-da37b9ba5421dc03b28d507c2de7a422790a190a.tar.bz2 |
GN(Android): Add libosmesa.so to ContentShell.apk
BUG=559289
Review URL: https://codereview.chromium.org/1473273002
Cr-Commit-Position: refs/heads/master@{#362866}
Diffstat (limited to 'third_party/mesa/BUILD.gn')
-rw-r--r-- | third_party/mesa/BUILD.gn | 101 |
1 files changed, 46 insertions, 55 deletions
diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn index 73be8e6..6ae815d 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") { |