diff options
author | kbr <kbr@chromium.org> | 2016-01-06 22:40:58 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-07 06:42:08 +0000 |
commit | 3d9a87e79c0567f6d42280d5b12fd88b29cc0a1e (patch) | |
tree | 85d1320cc69deaece44e8dc6e8e3c90dd67b5e0a /gpu/gles2_conform_support | |
parent | 5dd81267d84fdffbca3b0d4c6ada01e57d04035d (diff) | |
download | chromium_src-3d9a87e79c0567f6d42280d5b12fd88b29cc0a1e.zip chromium_src-3d9a87e79c0567f6d42280d5b12fd88b29cc0a1e.tar.gz chromium_src-3d9a87e79c0567f6d42280d5b12fd88b29cc0a1e.tar.bz2 |
Make gles2_conform_test build and run with GN on Linux.
BUG=573378
TBR=piman@chromium.org,sievers@chromium.org
Review URL: https://codereview.chromium.org/1568583003
Cr-Commit-Position: refs/heads/master@{#368026}
Diffstat (limited to 'gpu/gles2_conform_support')
-rw-r--r-- | gpu/gles2_conform_support/BUILD.gn | 97 | ||||
-rw-r--r-- | gpu/gles2_conform_support/native/BUILD.gn | 11 |
2 files changed, 60 insertions, 48 deletions
diff --git a/gpu/gles2_conform_support/BUILD.gn b/gpu/gles2_conform_support/BUILD.gn index 87f0362..4618e79 100644 --- a/gpu/gles2_conform_support/BUILD.gn +++ b/gpu/gles2_conform_support/BUILD.gn @@ -7,6 +7,32 @@ declare_args() { internal_gles2_conform_tests = false } +config("gles2_conform_test_warnings") { + if (is_clang) { + cflags = [ + "-Wno-array-bounds", + "-Wno-implicit-function-declaration", + "-Wno-logical-op-parentheses", + + # Many struct initializers in the GTF_ES code are missing braces. + "-Wno-missing-braces", + "-Wno-parentheses-equality", + "-Wno-pointer-sign", + "-Wno-return-type", + "-Wno-sign-compare", + "-Wno-sizeof-pointer-memaccess", + + # A few variables are unitialized if GLVersion != 2.0. + "-Wno-sometimes-uninitialized", + "-Wno-tautological-compare", + + # GTFVecBase.h contains static no-inline functions in a header :-/ + "-Wno-unused-function", + "-Wno-unused-variable", + ] + } +} + import("//build/config/allocator.gni") import("//testing/test.gni") @@ -57,6 +83,13 @@ if (internal_gles2_conform_tests) { rebase_path("$target_gen_dir/gles2_conform_test_embedded_data"), ] } + action("generate_gles2_conform_tests") { + script = "generate_gles2_conform_tests.py" + outputs = [ + "$target_gen_dir/gles2_conform_test_autogen.cc", + ] + args = [ rebase_path("$target_gen_dir") ] + } gles2_conform_gypi = exec_script("//build/gypi_to_gn.py", [ @@ -70,34 +103,38 @@ if (internal_gles2_conform_tests) { testonly = true # Include a dummy c++ file to force linking of libstdc++. - sources = [ "dummy.cc" ] + gles2_conform_gypi.gtf_es_sources + sources = [ + "dummy.cc", + ] + sources += gles2_conform_gypi.gtf_es_sources + sources += gles2_conform_gypi.gl2_extension_test_sources + sources += gles2_conform_gypi.gl2_fixed_test_sources + sources += gles2_conform_gypi.gl2_test_sources defines = [ "GTF_API=GTF_GLES20", "HKEMBEDDEDFILESYSTEM", ] + include_dirs = [ + rebase_path("$target_gen_dir/gles2_conform_test_embedded_data"), + "//third_party/gles2_conform/GTF_ES/glsl/GTF/Source", + ] deps = [ ":generate_gles2_conform_embedded_data", "//build/config/sanitizers:deps", "//gpu/command_buffer/client:gles2_c_lib_nocheck", "//gpu/gles2_conform_support/egl", "//gpu/gles2_conform_support/native:windowless", + "//third_party/expat:expat", + ] + configs += [ + "//build/config/compiler:no_incompatible_pointer_warnings", + + # Must be done this way for warning flags to be ordered correctly. + ":gles2_conform_test_warnings", ] - configs += [ "//build/config/compiler:no_incompatible_pointer_warnings" ] if (is_linux) { if (!is_chromeos) { deps += [ "//build/config/linux/gtk2" ] - - if (is_clang) { - cflags = [ - "-Wno-array-bounds", - "-Wno-implicit-function-declaration", - "-Wno-parentheses-equality", - "-Wno-pointer-sign", - "-Wno-return-type", - "-Wno-sizeof-pointer-memaccess", - "-Wno-tautological-compare", - ] - } } } if (is_win) { @@ -122,31 +159,6 @@ if (internal_gles2_conform_tests) { "_STDINT", "_STDINT_H", ] - if (is_clang) { - cflags = [ - "-Wno-pointer-sign", - "-Wno-array-bounds", - "-Wno-sizeof-pointer-memaccess", - "-Wno-implicit-function-declaration", - "-Wno-logical-op-parentheses", - "-Wno-tautological-compare", - "-Wno-parentheses-equality", - "-Wno-return-type", - ] - #"xcode_settings": { - #"LD": "clang++", - #"WARNING_CFLAGS": [ - #"-Wno-pointer-sign", - #"-Wno-array-bounds", - #"-Wno-sizeof-pointer-memaccess", - #"-Wno-implicit-function-declaration", - #"-Wno-logical-op-parentheses", - #"-Wno-tautological-compare", - #"-Wno-parentheses-equality", - #"-Wno-return-type", - #], - #}, - } } #'run_as': { @@ -187,7 +199,12 @@ test("gles2_conform_test") { ] if (internal_gles2_conform_tests) { - deps += [ ":gles2_conform_test_windowless" ] + deps += [ + ":generate_gles2_conform_tests", + ":gles2_conform_test_windowless", + ] + sources += [ "$target_gen_dir/gles2_conform_test_autogen.cc" ] + # TODO: Make these tests pull in the correct data dependencies once they # are exported in GN. Maybe from //third_party/gles2_conform/GTF_ES/ } diff --git a/gpu/gles2_conform_support/native/BUILD.gn b/gpu/gles2_conform_support/native/BUILD.gn index 0d1c0ee..f64048c 100644 --- a/gpu/gles2_conform_support/native/BUILD.gn +++ b/gpu/gles2_conform_support/native/BUILD.gn @@ -7,7 +7,6 @@ source_set("native") { output_name = "egl_main_native" sources = [ "egl_native.cc", - "egl_native_win.cc", "main.cc", ] defines = [ @@ -27,6 +26,9 @@ source_set("native") { "egl_native_x11.cc", ] } + if (is_win) { + sources += [ "egl_native_win.cc" ] + } } # GYP version: gpu/gles2_conform_support/gles2_conform_support.gyp:egl_main_windowless @@ -34,7 +36,6 @@ source_set("windowless") { output_name = "egl_main_windowless" sources = [ "egl_native.cc", - "egl_native_win.cc", "egl_native_windowless.cc", "main.cc", ] @@ -49,10 +50,4 @@ source_set("windowless") { "//gpu/gles2_conform_support/egl", "//ui/gl", ] - if (is_linux) { - sources += [ - "egl_native_aura.cc", - "egl_native_x11.cc", - ] - } } |