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