0

I'm building a library that has a configure file. When using emconfigure, what value should be specified for the host switch so that it compiles for WebAssembly? For example emconfigure ./configure --host none -O3. I've looked but can't find the documentation for this.

northerner
  • 756
  • 5
  • 21
  • Can you just not set any value? – HolyBlackCat May 09 '23 at 09:45
  • @HolyBlackCat if no value is given for host, `emconfigure` fails with `checking for assembler label suffix... configure: error: Cannot determine label suffix` – northerner May 15 '23 at 06:07
  • [This](https://stackoverflow.com/q/41080815/2752075) suggests `--host none --disable-assembly`. – HolyBlackCat May 15 '23 at 10:51
  • @HolyBlackCat that does technically work but I'm wondering if there's a better option in terms of optimization? Also some explanation would be nice. – northerner May 15 '23 at 20:30
  • I mean, you can probably still add `-O3`. Regarding custom assembly, which I assume `--disable-assembly` disables, if there actually was custom assembly for WASM, it would probably work out of the box. – HolyBlackCat May 15 '23 at 20:45
  • @HolyBlackCat should `-flto` be passed for enabling link time optimization? When is this useful? – northerner May 17 '23 at 20:56
  • I think emscripten's `-O3` does it by default? In any case, this is a separate issue (optimizing the code as opposed to fixing `configure` errors), and should be asked in a separate question. – HolyBlackCat May 17 '23 at 21:06

0 Answers0