emscripten-core / emscripten-core/emscripten

Unable to use ThinLTO

Open
#15,427 16 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I'm experimenting with ThinLTO instead of monolithic LTO, but unfortunately it always fails.

I get one of the two following errors at link time:

```
wasm-ld: error: inconsistent LTO Unit splitting (recompile with -fsplit-lto-unit)
```

or

```
wasm-ld: error: Expected at most one ThinLTO module per bitcode file
```

I've tried recompiling with `-fsplit-lto-unit`, as suggested, but I still get the same error. Based on [this](https://reviews.llvm.org/D53891), LTO unit splitting should be enabled by default as soon as I enable `-fwhole-program-vtables`, which I always have enabled.

Is ThinLTO supported by the emscripten?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.