Skip to content

Unable to use LTO in Bazel. #971

@PiotrSikora

Description

@PiotrSikora

For context, I'm working on updating Proxy-Wasm C++ SDK from our custom toolchain to @emsdk (see: proxy-wasm/proxy-wasm-cpp-sdk#132) and I'm seeing some regressions in terms of features.

$ bazel build -c opt //example/...
[...]
Target //example:http_wasm_example.wasm up-to-date:
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.js
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.wasm
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.wasm.map
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.js.mem
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.fetch.js
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.worker.js
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.data
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.js.symbols
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.wasm.debug.wasm
  bazel-bin/example/http_wasm_example.wasm/proxy_wasm_http_wasm_example.html
bazel build -s -c opt --linkopt=-flto //example/...
[...]
Exception: FROZEN_CACHE is set, but cache file is missing: "sysroot/lib/wasm32-emscripten/lto/crt1_reactor.o" 

Same without --no-entry for commands:

Exception: FROZEN_CACHE is set, but cache file is missing: "sysroot/lib/wasm32-emscripten/lto/crt1.o"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions