configure.ac sets DEF_MAKE_ALL_RULE to:
- if
--enable-optimizations is passed, then profile-opt
- if
ac_sys_system is Emscripten or WASI then build_wasm
- if neither of these, then
build_all.
build_wasm is a modified version of the build_all target that drops some targets that don't build correctly in webassembly targets or are unneeded. This logic hasn't been added for the case when --enable-optimizations is passed. I think the best solution for now would be to check for these targets with --enable-optimizations and error out. I don't think PGO will work on the wasm targets without tinkering either way.
Linked PRs