MaskRay wrote: > Failed to cherry-pick: > [415b70a](https://github.com/llvm/llvm-project/commit/415b70a8a11d369176ea2db5151424d9354ba41a) > > [llvm/llvm-project/actions/runs/37749879212](https://github.com/llvm/llvm-project/actions/runs/37749879212) > > Please manually backport the fix and push it to your github fork. Once this > is done, please create a [pull > request](https://github.com/llvm/llvm-project/compare)
> Failed to cherry-pick: > [415b70a](https://github.com/llvm/llvm-project/commit/415b70a8a11d369176ea2db5151424d9354ba41a) > > [llvm/llvm-project/actions/runs/37749879212](https://github.com/llvm/llvm-project/actions/runs/37749879212) > > Please manually backport the fix and push it to your github fork. Once this > is done, please create a [pull > request](https://github.com/llvm/llvm-project/compare) I don't think this belong to main or release/23.x. This requirement a rework: ``` - The test passes without the fix. #224313 removed -wasm-enable-eh before this landed, so -fwasm-exceptions no longer depends on a cl::opt. With one try/catch cell, the test passes whether or not the constructor parse and the Wasm.cpp restore are there. A test that matters needs at least two cells and an -mllvm option whose loss you can observe. - A bad -mllvm exits the process. parseLLVMArgs passes Errs=nullptr, so a typo calls exit(1) from the Interpreter constructor instead of being reported through ErrOut. For an embedder such as xeus-cpp or CppInterOp, that kills the kernel. - The restore in Wasm.cpp uses plain cl::ParseCommandLineOptions, which rejects library options since #242692. An -mllvm naming a ported option is accepted when the interpreter is created, then exits after the first wasm-ld link. - There's a simpler way to restore options after wasm-ld. @sbc100 suggested it in #178139: pass the arguments to wasm-ld again. lld resets the cl:: options and then parses its own -mllvm, so forwarding the frontend's -mllvm arguments to wasm-ld leaves them set after the link. clang-repl then needs no second parse, and IncrementalExecutorBuilder needs no wasm-only field. - The llvm_shutdown() guard in InterpreterTestFixture.h isn't Emscripten-specific. After llvm_shutdown(), cl::opts don't register again on any platform. A native suite that passes -mllvm after an earlier suite's teardown would hit the same "Unknown command line argument". ``` I plan to revert this on main and send a reimplementation. It will parse once into CI.LibraryOptions and return an llvm::Error on failure. The executors' TargetMachines will get the library options from the LLVMContext. wasm-ld will receive the -mllvm arguments. The tests will run on native builds and fail without the fix. cc @vgvassilev https://github.com/llvm/llvm-project/pull/197133 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
