Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 1 | load("//tools/build_rules:ruby.bzl", "ruby_binary") |
| 2 | load("//aos/build:queues.bzl", "queue_library") |
| 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
James Kuszmaul | 27da814 | 2019-07-21 16:13:55 -0700 | [diff] [blame] | 4 | load("//tools/cpp/emscripten:defs.bzl", "emcc_binary") |
| 5 | |
| 6 | emcc_binary( |
| 7 | name = "helloworld.html", |
| 8 | srcs = ["helloworld.cc"], |
| 9 | ) |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 10 | |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 11 | emcc_binary( |
| 12 | name = "webgl.html", |
| 13 | srcs = ["webgl_draw_triangle.c"], |
| 14 | ) |
| 15 | |
| 16 | emcc_binary( |
| 17 | name = "webgl2.html", |
James Kuszmaul | 36816f3 | 2019-08-31 16:58:23 -0700 | [diff] [blame^] | 18 | srcs = ["webgl2_benchmark.cc"], |
| 19 | html_shell = "minimal_shell.html", |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 20 | # Enable WEBGL2 (-s is used by the emscripten |
| 21 | # compiler to specify sundry options). |
| 22 | linkopts = [ |
| 23 | "-s", |
| 24 | "USE_WEBGL2=1", |
James Kuszmaul | 36816f3 | 2019-08-31 16:58:23 -0700 | [diff] [blame^] | 25 | "-s", |
| 26 | "TOTAL_MEMORY=" + repr(256 * 1024 * 1024), |
James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 27 | ], |
| 28 | ) |
| 29 | |
Brian Silverman | fbe79b8 | 2015-09-12 15:10:54 -0400 | [diff] [blame] | 30 | cc_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 31 | name = "gflags_build_test", |
| 32 | size = "small", |
| 33 | srcs = [ |
| 34 | "gflags.cc", |
| 35 | ], |
| 36 | deps = [ |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 37 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 38 | ], |
Brian Silverman | fbe79b8 | 2015-09-12 15:10:54 -0400 | [diff] [blame] | 39 | ) |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 40 | |
| 41 | ruby_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 42 | name = "ruby_binary", |
| 43 | srcs = [ |
| 44 | "ruby.rb", |
| 45 | "ruby_to_require.rb", |
| 46 | ], |
| 47 | data = [ |
| 48 | "ruby_to_require.rb", |
| 49 | ], |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 50 | ) |
| 51 | |
| 52 | sh_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 53 | name = "ruby_build_test", |
| 54 | size = "small", |
| 55 | srcs = [ |
| 56 | "ruby_check.sh", |
| 57 | ], |
| 58 | data = [ |
| 59 | ":ruby_binary", |
| 60 | ], |
Brian Silverman | b67da23 | 2015-09-12 23:50:30 -0400 | [diff] [blame] | 61 | ) |
Brian Silverman | 38658b0 | 2015-09-13 02:25:50 -0400 | [diff] [blame] | 62 | |
| 63 | queue_library( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 64 | name = "queue_library", |
| 65 | srcs = [ |
| 66 | "queue.q", |
| 67 | ], |
Brian Silverman | 38658b0 | 2015-09-13 02:25:50 -0400 | [diff] [blame] | 68 | ) |
| 69 | |
| 70 | cc_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 71 | name = "queue_build_test", |
| 72 | size = "small", |
| 73 | srcs = [ |
| 74 | "queue.cc", |
| 75 | ], |
| 76 | deps = [ |
| 77 | ":queue_library", |
| 78 | ], |
Brian Silverman | 38658b0 | 2015-09-13 02:25:50 -0400 | [diff] [blame] | 79 | ) |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 80 | |
| 81 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 82 | name = "tcmalloc_build_test_binary", |
| 83 | srcs = [ |
| 84 | "tcmalloc.cc", |
| 85 | ], |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 86 | ) |
| 87 | |
| 88 | sh_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 89 | name = "tcmalloc_build_test", |
| 90 | size = "small", |
| 91 | srcs = [ |
| 92 | "tcmalloc_test.sh", |
| 93 | ], |
| 94 | data = [ |
| 95 | ":tcmalloc_build_test_binary", |
| 96 | ], |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 97 | ) |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 98 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 99 | cc_proto_library( |
| 100 | name = "proto_build_test_library", |
| 101 | srcs = ["proto.proto"], |
| 102 | deps = [ |
| 103 | ":proto_build_test_library_base", |
| 104 | "@com_google_protobuf//:cc_wkt_protos", |
| 105 | ], |
Parker Schuh | 971588a | 2017-03-01 22:15:04 -0800 | [diff] [blame] | 106 | ) |
| 107 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 108 | cc_proto_library( |
| 109 | name = "proto_build_test_library_base", |
| 110 | srcs = ["proto_base.proto"], |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 111 | ) |
| 112 | |
| 113 | cc_test( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 114 | name = "proto_build_test", |
| 115 | size = "small", |
| 116 | srcs = [ |
| 117 | "proto.cc", |
| 118 | ], |
| 119 | deps = [ |
| 120 | ":proto_build_test_library", |
| 121 | "//aos/testing:googletest", |
| 122 | ], |
Brian Silverman | eb16fa4 | 2016-02-20 15:29:56 -0500 | [diff] [blame] | 123 | ) |