[PATCH] D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries

Derek Schuff via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 17:40:08 PST 2019


dschuff added a comment.

LGTM on the approach, just one more question on the wasm-opt flags.



================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:105
+        OOpt = "0";
+      else if (A->getOption().matches(options::OPT_O))
+        OOpt = A->getValue();
----------------
This chain is slightly confusing. I assume this `getValue()` captures the number in `-O3`, `-O2`, etc? But why then do we need special-casing for 0 and 4 above?

For that matter, we should probably not run wasm-opt at all if the opt-level is 0, right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70500/new/

https://reviews.llvm.org/D70500





More information about the cfe-commits mailing list