File: emscripten.bzl

package info (click to toggle)
xnnpack 0.0~git20201031.beca652%2Breally.git20200323.1b35463-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,260 kB
  • sloc: cpp: 287,277; ansic: 197,749; asm: 25,609; python: 7,794; sh: 1,286; makefile: 14
file content (37 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Emscripten-specific build definitions for XNNPACK."""

def xnnpack_emscripten_minimal_linkopts():
    """Minimal Emscripten-specific linkopts for binaries."""
    return [
        "-s ASSERTIONS=0",
        "-s ERROR_ON_UNDEFINED_SYMBOLS=1",
        "-s EXIT_RUNTIME=1",
    ]

def xnnpack_emscripten_test_linkopts():
    """Emscripten-specific linkopts for unit tests."""
    return [
        "-s ASSERTIONS=2",
        "-s ERROR_ON_UNDEFINED_SYMBOLS=1",
        "-s DEMANGLE_SUPPORT=1",
        "-s EXIT_RUNTIME=1",
        "-s ALLOW_MEMORY_GROWTH=1",
        "--pre-js $(location :preamble.js.lds)",
    ]

def xnnpack_emscripten_benchmark_linkopts():
    """Emscripten-specific linkopts for benchmarks."""
    return [
        "-s ASSERTIONS=1",
        "-s ERROR_ON_UNDEFINED_SYMBOLS=1",
        "-s EXIT_RUNTIME=1",
        "-s ALLOW_MEMORY_GROWTH=1",
        "-s TOTAL_MEMORY=268435456",  # 256M
        "--pre-js $(location :preamble.js.lds)",
    ]

def xnnpack_emscripten_deps():
    """Emscripten-specific dependencies for unit tests and benchmarks."""
    return [
        ":preamble.js.lds",
    ]