Skip to content

Commit d5e2795

Browse files
committed
Make tests faster by not building the entire cache
1 parent 75656b1 commit d5e2795

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

bazel/test_secondary_lto_cache/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
33
cc_binary(
44
name = "hello-world",
55
srcs = ["hello-world.cc"],
6-
linkopts = ["-flto"],
6+
linkopts = [
7+
"-sAUTO_NATIVE_LIBRARIES=0",
8+
"-flto",
9+
],
710
)
811

912
wasm_cc_binary(

bazel/test_secondary_lto_cache/WORKSPACE

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@ emscripten_deps()
1313

1414
load("@emsdk//:emscripten_cache.bzl", "emscripten_cache")
1515

16-
emscripten_cache(flags = ["--lto"])
16+
emscripten_cache(
17+
flags = ["--lto"],
18+
libraries = [
19+
"crtbegin",
20+
"libprintf_long_double-debug",
21+
"libstubs-debug",
22+
"libnoexit",
23+
"libc-debug",
24+
"libdlmalloc",
25+
"libcompiler_rt",
26+
"libc++-noexcept",
27+
"libc++abi-debug-noexcept",
28+
"libsockets"
29+
]
30+
)
1731

1832
load("@emsdk//:toolchains.bzl", "register_emscripten_toolchains")
1933

0 commit comments

Comments
 (0)