Mercurial
comparison third_party/emsdk/bazel/test_external/long_command_line/BUILD.bazel @ 179:8d17f6e6e290
[ThirdParty] Added emsdk bazel rules that can be supported by bazel 9.0.0
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Thu, 22 Jan 2026 21:23:17 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 178:94705b5986b3 | 179:8d17f6e6e290 |
|---|---|
| 1 load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary") | |
| 2 load("@rules_cc//cc:defs.bzl", "cc_binary") | |
| 3 | |
| 4 _TEST_TARGETS = [ | |
| 5 "long_command_line_file01", | |
| 6 "long_command_line_file02", | |
| 7 "long_command_line_file03", | |
| 8 "long_command_line_file04", | |
| 9 "long_command_line_file05", | |
| 10 "long_command_line_file06", | |
| 11 "long_command_line_file07", | |
| 12 "long_command_line_file08", | |
| 13 "long_command_line_file09", | |
| 14 "long_command_line_file10", | |
| 15 "long_command_line_file11", | |
| 16 "long_command_line_file12", | |
| 17 "long_command_line_file13", | |
| 18 "long_command_line_file14", | |
| 19 "long_command_line_file15", | |
| 20 "long_command_line_file16", | |
| 21 "long_command_line_file17", | |
| 22 "long_command_line_file18", | |
| 23 "long_command_line_file19", | |
| 24 "long_command_line_file20", | |
| 25 ] | |
| 26 | |
| 27 _TEST_TARGET_SUFFIXES = [ | |
| 28 "a", | |
| 29 "b", | |
| 30 "c", | |
| 31 "d", | |
| 32 "e", | |
| 33 "f", | |
| 34 "g", | |
| 35 "h", | |
| 36 "i", | |
| 37 "j", | |
| 38 ] | |
| 39 | |
| 40 [cc_library( | |
| 41 name = "{}_{}".format(target, suffix), | |
| 42 hdrs = ["include/{}.hh".format(target)], | |
| 43 # stripping include prefix to create more flags passed to emcc | |
| 44 strip_include_prefix = "include", | |
| 45 srcs = ["{}.cc".format(target)], | |
| 46 ) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES] | |
| 47 | |
| 48 cc_binary( | |
| 49 name = "long_command_line", | |
| 50 linkshared = True, | |
| 51 srcs = ["long_command_line.cc"], | |
| 52 deps = [":{}_{}".format(target, suffix) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES], | |
| 53 ) | |
| 54 | |
| 55 wasm_cc_binary( | |
| 56 name = "long_command_line_wasm", | |
| 57 cc_target = ":long_command_line", | |
| 58 outputs = [ | |
| 59 "long_command_line.js", | |
| 60 "long_command_line.wasm", | |
| 61 ], | |
| 62 ) |