Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 1 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
James Kuszmaul | 27da814 | 2019-07-21 16:13:55 -0700 | [diff] [blame] | 2 | load("//tools/cpp/emscripten:defs.bzl", "emcc_binary") |
| 3 | |
| 4 | emcc_binary( |
| 5 | name = "helloworld.html", |
| 6 | srcs = ["helloworld.cc"], |
| 7 | ) |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 8 | |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 9 | emcc_binary( |
| 10 | name = "webgl.html", |
| 11 | srcs = ["webgl_draw_triangle.c"], |
| 12 | ) |
| 13 | |
| 14 | emcc_binary( |
| 15 | name = "webgl2.html", |
James Kuszmaul | 36816f3 | 2019-08-31 16:58:23 -0700 | [diff] [blame] | 16 | srcs = ["webgl2_benchmark.cc"], |
| 17 | html_shell = "minimal_shell.html", |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 18 | # Enable WEBGL2 (-s is used by the emscripten |
| 19 | # compiler to specify sundry options). |
| 20 | linkopts = [ |
| 21 | "-s", |
| 22 | "USE_WEBGL2=1", |
James Kuszmaul | 36816f3 | 2019-08-31 16:58:23 -0700 | [diff] [blame] | 23 | "-s", |
| 24 | "TOTAL_MEMORY=" + repr(256 * 1024 * 1024), |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 25 | ], |
| 26 | ) |
| 27 | |
Brian Silverman | fbe79b8 | 2015-09-12 15:10:54 -0400 | [diff] [blame] | 28 | cc_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 29 | name = "gflags_build_test", |
| 30 | size = "small", |
| 31 | srcs = [ |
| 32 | "gflags.cc", |
| 33 | ], |
| 34 | deps = [ |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 35 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 36 | ], |
Brian Silverman | fbe79b8 | 2015-09-12 15:10:54 -0400 | [diff] [blame] | 37 | ) |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 38 | |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 39 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 40 | name = "tcmalloc_build_test_binary", |
| 41 | srcs = [ |
| 42 | "tcmalloc.cc", |
| 43 | ], |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 44 | ) |
| 45 | |
| 46 | sh_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 47 | name = "tcmalloc_build_test", |
| 48 | size = "small", |
| 49 | srcs = [ |
| 50 | "tcmalloc_test.sh", |
| 51 | ], |
| 52 | data = [ |
| 53 | ":tcmalloc_build_test_binary", |
| 54 | ], |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 55 | ) |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 56 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 57 | cc_proto_library( |
| 58 | name = "proto_build_test_library", |
| 59 | srcs = ["proto.proto"], |
| 60 | deps = [ |
| 61 | ":proto_build_test_library_base", |
| 62 | "@com_google_protobuf//:cc_wkt_protos", |
| 63 | ], |
Parker Schuh | 971588a | 2017-03-01 22:15:04 -0800 | [diff] [blame] | 64 | ) |
| 65 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 66 | cc_proto_library( |
| 67 | name = "proto_build_test_library_base", |
| 68 | srcs = ["proto_base.proto"], |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 69 | ) |
| 70 | |
| 71 | cc_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 72 | name = "proto_build_test", |
| 73 | size = "small", |
| 74 | srcs = [ |
| 75 | "proto.cc", |
| 76 | ], |
| 77 | deps = [ |
| 78 | ":proto_build_test_library", |
| 79 | "//aos/testing:googletest", |
| 80 | ], |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 81 | ) |