[all-commits] [llvm/llvm-project] 25825d: [WebAssembly] Enable Wasm EH features only once (#...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Thu Jan 23 14:47:37 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25825d4ac9683010b0b921924cd5e244a82db1a3
      https://github.com/llvm/llvm-project/commit/25825d4ac9683010b0b921924cd5e244a82db1a3
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2025-01-23 (Thu, 23 Jan 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/WebAssembly.cpp

  Log Message:
  -----------
  [WebAssembly] Enable Wasm EH features only once (#124042)

#122466 had an unexpected side effect that,
`EnableFeaturesForWasmEHSjLj` and `BanIncompatibleOptionsForWasmEHSjLj`
can be called multiple times now, every time a Wasm EH flag
(`-fwasm-exceptions`, `-wasm-enable-eh`, `-wasm-enable-sjlj`, ..) was
checked and handled. This resulted in unnecessarily adding the same
feature-enabling arguments multiple times to the command line, for
example, `-target-feature +exception-handling` could be added as many as
three times, which didn't cause any errors but unnecessary. Also we ran
`BanIncompatibleOptionsForWasmEHSjLj` more than once, which was harmless
but unnecessary.

This guards these functions with a static variable so that we only run
them once.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list