From 8e6b45fbe148003e0440fa66014e74dc95d210fb Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Sun, 21 Apr 2024 15:33:54 -0700 Subject: [PATCH] fix(bazel): use param file for compile * fixes issues on windows when dealing with many dependencies causing a 'command line too long' error --- bazel/emscripten_toolchain/toolchain.bzl | 12 +++- bazel/emscripten_toolchain/wasm_binary.py | 2 + .../long_command_line/BUILD.bazel | 61 +++++++++++++++++++ .../include/long_command_line_file01.hh | 3 + .../include/long_command_line_file02.hh | 3 + .../include/long_command_line_file03.hh | 3 + .../include/long_command_line_file04.hh | 3 + .../include/long_command_line_file05.hh | 3 + .../include/long_command_line_file06.hh | 3 + .../include/long_command_line_file07.hh | 3 + .../include/long_command_line_file08.hh | 3 + .../include/long_command_line_file09.hh | 3 + .../include/long_command_line_file10.hh | 3 + .../include/long_command_line_file11.hh | 3 + .../include/long_command_line_file12.hh | 3 + .../include/long_command_line_file13.hh | 3 + .../include/long_command_line_file14.hh | 3 + .../include/long_command_line_file15.hh | 3 + .../include/long_command_line_file16.hh | 3 + .../include/long_command_line_file17.hh | 3 + .../include/long_command_line_file18.hh | 3 + .../include/long_command_line_file19.hh | 3 + .../include/long_command_line_file20.hh | 3 + .../long_command_line/long_command_line.cc | 43 +++++++++++++ .../long_command_line_file01.cc | 5 ++ .../long_command_line_file02.cc | 5 ++ .../long_command_line_file03.cc | 5 ++ .../long_command_line_file04.cc | 5 ++ .../long_command_line_file05.cc | 5 ++ .../long_command_line_file06.cc | 5 ++ .../long_command_line_file07.cc | 5 ++ .../long_command_line_file08.cc | 5 ++ .../long_command_line_file09.cc | 5 ++ .../long_command_line_file10.cc | 5 ++ .../long_command_line_file11.cc | 5 ++ .../long_command_line_file12.cc | 5 ++ .../long_command_line_file13.cc | 5 ++ .../long_command_line_file14.cc | 5 ++ .../long_command_line_file15.cc | 5 ++ .../long_command_line_file16.cc | 5 ++ .../long_command_line_file17.cc | 5 ++ .../long_command_line_file18.cc | 5 ++ .../long_command_line_file19.cc | 5 ++ .../long_command_line_file20.cc | 5 ++ test/test_bazel.ps1 | 3 + test/test_bazel.sh | 3 +- test/test_bazel_mac.sh | 1 + 47 files changed, 283 insertions(+), 2 deletions(-) create mode 100644 bazel/test_external/long_command_line/BUILD.bazel create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file01.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file02.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file03.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file04.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file05.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file06.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file07.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file08.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file09.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file10.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file11.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file12.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file13.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file14.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file15.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file16.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file17.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file18.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file19.hh create mode 100644 bazel/test_external/long_command_line/include/long_command_line_file20.hh create mode 100644 bazel/test_external/long_command_line/long_command_line.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file01.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file02.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file03.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file04.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file05.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file06.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file07.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file08.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file09.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file10.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file11.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file12.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file13.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file14.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file15.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file16.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file17.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file18.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file19.cc create mode 100644 bazel/test_external/long_command_line/long_command_line_file20.cc diff --git a/bazel/emscripten_toolchain/toolchain.bzl b/bazel/emscripten_toolchain/toolchain.bzl index 835255a0bb..7e7eebf3b7 100644 --- a/bazel/emscripten_toolchain/toolchain.bzl +++ b/bazel/emscripten_toolchain/toolchain.bzl @@ -1,5 +1,6 @@ """This module encapsulates logic to create emscripten_cc_toolchain_config rule.""" +load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") load( "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "action_config", @@ -14,7 +15,6 @@ load( "with_feature_set", _flag_set = "flag_set", ) -load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") def flag_set(flags = None, features = None, not_features = None, **kwargs): """Extension to flag_set which allows for a "simple" form. @@ -346,6 +346,16 @@ def _impl(ctx): provides = ["variant:crosstool_build_mode"], ), + # Feature to prevent 'command line too long' issues + feature( + name = "archive_param_file", + enabled = True, + ), + feature( + name = "compiler_param_file", + enabled = True, + ), + #### User-settable features # Set if enabling exceptions. diff --git a/bazel/emscripten_toolchain/wasm_binary.py b/bazel/emscripten_toolchain/wasm_binary.py index d7d6142376..4684dea7e3 100644 --- a/bazel/emscripten_toolchain/wasm_binary.py +++ b/bazel/emscripten_toolchain/wasm_binary.py @@ -32,6 +32,8 @@ def main(): args.archive = os.path.normpath(args.archive) args.outputs = args.outputs.split(",") + print("ARCHIVE IS:" + args.archive) + tar = tarfile.open(args.archive) for member in tar.getmembers(): diff --git a/bazel/test_external/long_command_line/BUILD.bazel b/bazel/test_external/long_command_line/BUILD.bazel new file mode 100644 index 0000000000..4ffe247604 --- /dev/null +++ b/bazel/test_external/long_command_line/BUILD.bazel @@ -0,0 +1,61 @@ +load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary") + +_TEST_TARGETS = [ + "long_command_line_file01", + "long_command_line_file02", + "long_command_line_file03", + "long_command_line_file04", + "long_command_line_file05", + "long_command_line_file06", + "long_command_line_file07", + "long_command_line_file08", + "long_command_line_file09", + "long_command_line_file10", + "long_command_line_file11", + "long_command_line_file12", + "long_command_line_file13", + "long_command_line_file14", + "long_command_line_file15", + "long_command_line_file16", + "long_command_line_file17", + "long_command_line_file18", + "long_command_line_file19", + "long_command_line_file20", +] + +_TEST_TARGET_SUFFIXES = [ + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", +] + +[cc_library( + name = "{}_{}".format(target, suffix), + hdrs = ["include/{}.hh".format(target)], + # stripping include prefix to create more flags passed to emcc + strip_include_prefix = "include", + srcs = ["{}.cc".format(target)], +) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES] + +cc_binary( + name = "long_command_line", + linkshared = True, + srcs = ["long_command_line.cc"], + deps = [":{}_{}".format(target, suffix) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES], +) + +wasm_cc_binary( + name = "long_command_line_wasm", + cc_target = ":long_command_line", + outputs = [ + "long_command_line.js", + "long_command_line.wasm", + ], +) diff --git a/bazel/test_external/long_command_line/include/long_command_line_file01.hh b/bazel/test_external/long_command_line/include/long_command_line_file01.hh new file mode 100644 index 0000000000..8dd06bad8c --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file01.hh @@ -0,0 +1,3 @@ +#pragma once + +void f1(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file02.hh b/bazel/test_external/long_command_line/include/long_command_line_file02.hh new file mode 100644 index 0000000000..7a3a0ff11a --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file02.hh @@ -0,0 +1,3 @@ +#pragma once + +void f2(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file03.hh b/bazel/test_external/long_command_line/include/long_command_line_file03.hh new file mode 100644 index 0000000000..16880553f6 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file03.hh @@ -0,0 +1,3 @@ +#pragma once + +void f3(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file04.hh b/bazel/test_external/long_command_line/include/long_command_line_file04.hh new file mode 100644 index 0000000000..45ef1fca9b --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file04.hh @@ -0,0 +1,3 @@ +#pragma once + +void f4(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file05.hh b/bazel/test_external/long_command_line/include/long_command_line_file05.hh new file mode 100644 index 0000000000..707ad50280 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file05.hh @@ -0,0 +1,3 @@ +#pragma once + +void f5(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file06.hh b/bazel/test_external/long_command_line/include/long_command_line_file06.hh new file mode 100644 index 0000000000..5d91450067 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file06.hh @@ -0,0 +1,3 @@ +#pragma once + +void f6(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file07.hh b/bazel/test_external/long_command_line/include/long_command_line_file07.hh new file mode 100644 index 0000000000..b0bf811868 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file07.hh @@ -0,0 +1,3 @@ +#pragma once + +void f7(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file08.hh b/bazel/test_external/long_command_line/include/long_command_line_file08.hh new file mode 100644 index 0000000000..994b7ea7cd --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file08.hh @@ -0,0 +1,3 @@ +#pragma once + +void f8(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file09.hh b/bazel/test_external/long_command_line/include/long_command_line_file09.hh new file mode 100644 index 0000000000..90c19583c4 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file09.hh @@ -0,0 +1,3 @@ +#pragma once + +void f9(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file10.hh b/bazel/test_external/long_command_line/include/long_command_line_file10.hh new file mode 100644 index 0000000000..6a4388182a --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file10.hh @@ -0,0 +1,3 @@ +#pragma once + +void f10(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file11.hh b/bazel/test_external/long_command_line/include/long_command_line_file11.hh new file mode 100644 index 0000000000..878c9396b4 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file11.hh @@ -0,0 +1,3 @@ +#pragma once + +void f11(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file12.hh b/bazel/test_external/long_command_line/include/long_command_line_file12.hh new file mode 100644 index 0000000000..b5e0bc3e94 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file12.hh @@ -0,0 +1,3 @@ +#pragma once + +void f12(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file13.hh b/bazel/test_external/long_command_line/include/long_command_line_file13.hh new file mode 100644 index 0000000000..634dcef138 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file13.hh @@ -0,0 +1,3 @@ +#pragma once + +void f13(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file14.hh b/bazel/test_external/long_command_line/include/long_command_line_file14.hh new file mode 100644 index 0000000000..8fa9666214 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file14.hh @@ -0,0 +1,3 @@ +#pragma once + +void f14(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file15.hh b/bazel/test_external/long_command_line/include/long_command_line_file15.hh new file mode 100644 index 0000000000..1f7b7706a7 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file15.hh @@ -0,0 +1,3 @@ +#pragma once + +void f15(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file16.hh b/bazel/test_external/long_command_line/include/long_command_line_file16.hh new file mode 100644 index 0000000000..c9fa2fcefc --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file16.hh @@ -0,0 +1,3 @@ +#pragma once + +void f16(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file17.hh b/bazel/test_external/long_command_line/include/long_command_line_file17.hh new file mode 100644 index 0000000000..b959207b74 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file17.hh @@ -0,0 +1,3 @@ +#pragma once + +void f17(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file18.hh b/bazel/test_external/long_command_line/include/long_command_line_file18.hh new file mode 100644 index 0000000000..af0bacf55f --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file18.hh @@ -0,0 +1,3 @@ +#pragma once + +void f18(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file19.hh b/bazel/test_external/long_command_line/include/long_command_line_file19.hh new file mode 100644 index 0000000000..0ac9b4b027 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file19.hh @@ -0,0 +1,3 @@ +#pragma once + +void f19(); diff --git a/bazel/test_external/long_command_line/include/long_command_line_file20.hh b/bazel/test_external/long_command_line/include/long_command_line_file20.hh new file mode 100644 index 0000000000..0f10c733b7 --- /dev/null +++ b/bazel/test_external/long_command_line/include/long_command_line_file20.hh @@ -0,0 +1,3 @@ +#pragma once + +void f20(); diff --git a/bazel/test_external/long_command_line/long_command_line.cc b/bazel/test_external/long_command_line/long_command_line.cc new file mode 100644 index 0000000000..b1ec837153 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line.cc @@ -0,0 +1,43 @@ +#include "long_command_line_file01.hh" +#include "long_command_line_file02.hh" +#include "long_command_line_file03.hh" +#include "long_command_line_file04.hh" +#include "long_command_line_file05.hh" +#include "long_command_line_file06.hh" +#include "long_command_line_file07.hh" +#include "long_command_line_file08.hh" +#include "long_command_line_file09.hh" +#include "long_command_line_file10.hh" +#include "long_command_line_file11.hh" +#include "long_command_line_file12.hh" +#include "long_command_line_file13.hh" +#include "long_command_line_file14.hh" +#include "long_command_line_file15.hh" +#include "long_command_line_file16.hh" +#include "long_command_line_file17.hh" +#include "long_command_line_file18.hh" +#include "long_command_line_file19.hh" +#include "long_command_line_file20.hh" + +int main() { + f1(); + f2(); + f3(); + f4(); + f5(); + f6(); + f7(); + f8(); + f9(); + f10(); + f11(); + f12(); + f13(); + f14(); + f15(); + f16(); + f17(); + f18(); + f19(); + /* f20(); */ +} diff --git a/bazel/test_external/long_command_line/long_command_line_file01.cc b/bazel/test_external/long_command_line/long_command_line_file01.cc new file mode 100644 index 0000000000..3bf8d4aa07 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file01.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file01.hh" + +#include + +void f1() { std::cout << "hello from f1()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file02.cc b/bazel/test_external/long_command_line/long_command_line_file02.cc new file mode 100644 index 0000000000..b8ac8141c5 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file02.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file02.hh" + +#include + +void f2() { std::cout << "hello from f2()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file03.cc b/bazel/test_external/long_command_line/long_command_line_file03.cc new file mode 100644 index 0000000000..294e777419 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file03.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file03.hh" + +#include + +void f3() { std::cout << "hello from f3()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file04.cc b/bazel/test_external/long_command_line/long_command_line_file04.cc new file mode 100644 index 0000000000..c0d537d1b8 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file04.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file04.hh" + +#include + +void f4() { std::cout << "hello from f4()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file05.cc b/bazel/test_external/long_command_line/long_command_line_file05.cc new file mode 100644 index 0000000000..310e3e04ca --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file05.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file05.hh" + +#include + +void f5() { std::cout << "hello from f5()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file06.cc b/bazel/test_external/long_command_line/long_command_line_file06.cc new file mode 100644 index 0000000000..2c218fdcc4 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file06.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file06.hh" + +#include + +void f6() { std::cout << "hello from f6()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file07.cc b/bazel/test_external/long_command_line/long_command_line_file07.cc new file mode 100644 index 0000000000..c78dc400c8 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file07.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file07.hh" + +#include + +void f7() { std::cout << "hello from f7()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file08.cc b/bazel/test_external/long_command_line/long_command_line_file08.cc new file mode 100644 index 0000000000..1c2e10f889 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file08.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file08.hh" + +#include + +void f8() { std::cout << "hello from f8()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file09.cc b/bazel/test_external/long_command_line/long_command_line_file09.cc new file mode 100644 index 0000000000..6c0028dc32 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file09.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file09.hh" + +#include + +void f9() { std::cout << "hello from f9()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file10.cc b/bazel/test_external/long_command_line/long_command_line_file10.cc new file mode 100644 index 0000000000..9f0be9cf42 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file10.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file10.hh" + +#include + +void f10() { std::cout << "hello from f10()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file11.cc b/bazel/test_external/long_command_line/long_command_line_file11.cc new file mode 100644 index 0000000000..2ef8f96e2d --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file11.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file11.hh" + +#include + +void f11() { std::cout << "hello from f11()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file12.cc b/bazel/test_external/long_command_line/long_command_line_file12.cc new file mode 100644 index 0000000000..76349962b8 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file12.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file12.hh" + +#include + +void f12() { std::cout << "hello from f12()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file13.cc b/bazel/test_external/long_command_line/long_command_line_file13.cc new file mode 100644 index 0000000000..bca66d0cda --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file13.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file13.hh" + +#include + +void f13() { std::cout << "hello from f13()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file14.cc b/bazel/test_external/long_command_line/long_command_line_file14.cc new file mode 100644 index 0000000000..543179f6c2 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file14.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file14.hh" + +#include + +void f14() { std::cout << "hello from f14()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file15.cc b/bazel/test_external/long_command_line/long_command_line_file15.cc new file mode 100644 index 0000000000..28767ef84d --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file15.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file15.hh" + +#include + +void f15() { std::cout << "hello from f15()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file16.cc b/bazel/test_external/long_command_line/long_command_line_file16.cc new file mode 100644 index 0000000000..ca7ff99b61 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file16.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file16.hh" + +#include + +void f16() { std::cout << "hello from f16()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file17.cc b/bazel/test_external/long_command_line/long_command_line_file17.cc new file mode 100644 index 0000000000..2230d36faf --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file17.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file17.hh" + +#include + +void f17() { std::cout << "hello from f17()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file18.cc b/bazel/test_external/long_command_line/long_command_line_file18.cc new file mode 100644 index 0000000000..822cd14847 --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file18.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file18.hh" + +#include + +void f18() { std::cout << "hello from f18()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file19.cc b/bazel/test_external/long_command_line/long_command_line_file19.cc new file mode 100644 index 0000000000..b8640642fa --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file19.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file19.hh" + +#include + +void f19() { std::cout << "hello from f19()\n"; } diff --git a/bazel/test_external/long_command_line/long_command_line_file20.cc b/bazel/test_external/long_command_line/long_command_line_file20.cc new file mode 100644 index 0000000000..0562be6dda --- /dev/null +++ b/bazel/test_external/long_command_line/long_command_line_file20.cc @@ -0,0 +1,5 @@ +#include "long_command_line_file20.hh" + +#include + +void f20() { std::cout << "hello from f20()\n"; } diff --git a/test/test_bazel.ps1 b/test/test_bazel.ps1 index 3fd269c153..b417262e27 100644 --- a/test/test_bazel.ps1 +++ b/test/test_bazel.ps1 @@ -13,6 +13,9 @@ Set-Location test_external bazel build //:hello-world-wasm if (-not $?) { Exit $LastExitCode } +bazel build //long_command_line:long_command_line_wasm +if (-not $?) { Exit $LastExitCode } + bazel build //:hello-embind-wasm --compilation_mode dbg # debug if (-not $?) { Exit $LastExitCode } diff --git a/test/test_bazel.sh b/test/test_bazel.sh index bc53fcd829..d8d40e1716 100755 --- a/test/test_bazel.sh +++ b/test/test_bazel.sh @@ -26,9 +26,10 @@ bazel build //hello-world:hello-world-wasm-simd cd test_external bazel build //:hello-world-wasm +bazel build //long_command_line:long_command_line_wasm bazel build //:hello-embind-wasm --compilation_mode dbg # debug # Test use of the closure compiler bazel build //:hello-embind-wasm --compilation_mode opt # release # This function should not be minified if the externs file is loaded correctly. -grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js \ No newline at end of file +grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js diff --git a/test/test_bazel_mac.sh b/test/test_bazel_mac.sh index 58aa9f0ad9..4b58b502bd 100755 --- a/test/test_bazel_mac.sh +++ b/test/test_bazel_mac.sh @@ -25,4 +25,5 @@ bazel build //hello-world:hello-world-wasm bazel build //hello-world:hello-world-wasm-simd cd test_external +bazel build //long_command_line:long_command_line_wasm bazel build //:hello-world-wasm