HomePhabricator

[WebAssembly] Use wasm-opt and LTO libraries when available.

Authored by sunfishcode on Nov 20 2019, 3:25 PM.

Description

[WebAssembly] Use wasm-opt and LTO libraries when available.

When there's a wasm-opt in the PATH, run the it to optimize LLVM's
output. This fixes PR43796.

And, add an "llvm-lto" directory to the sysroot library search paths,
so that sysroots can provide LTO-enabled system libraries.

Differential Revision: https://reviews.llvm.org/D70500