[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > This broke building C++ modules for mingw targets. Repro: > > `empty.cppm`: > > ```c++ > > export module empty; > > ``` > > > > > > > > > > > > > > > > > > > > > > > > ``` > > $ clang -target x86_64-windows-gnu -x c++-module empty.cppm

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: > This broke building C++ modules for mingw targets. Repro: > > `empty.cppm`: > > ```c++ > export module empty; > ``` > > ``` > $ clang -target x86_64-windows-gnu -x c++-module empty.cppm -c -o > empty.cppm.obj -std=gnu++23 > error: invalid value 'seh' in '-exception-model=seh'

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-01 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This broke building C++ modules for mingw targets. Repro: `empty.cppm`: ```c++ export module empty; ``` ```console $ clang -target x86_64-windows-gnu -x c++-module empty.cppm -c -o empty.cppm.obj -std=gnu++23 error: invalid value 'seh' in '-exception-model=seh' ``` https://git

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-01` while building `clang` at step 7 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/207/builds/32

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: (FWIW I have the alternative fix here: https://github.com/jansvoboda11/llvm-project/commit/45f21d8adec34fdc13e86d529a133189ec1b1d15; happy to create a PR after yours lands.) https://github.com/llvm/llvm-project/pull/146342 ___ cfe

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. This is unfortunate. I think `ExceptionHandling` lives in `LangOptions` mainly because it's used to set predefined macros, similar to `Optimize` and others. This LGTM as an immediate workaround, but can you make sure to leave behind a

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
@@ -3679,6 +3679,22 @@ static StringRef GetInputKindName(InputKind IK) { llvm_unreachable("unknown input language"); } +static StringRef getExceptionHandlingName(unsigned EHK) { + switch (static_cast(EHK)) { + case LangOptions::ExceptionHandlingKind::None: + default: +

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
@@ -3694,6 +3710,10 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_pic_is_pie); for (StringRef Sanitizer : serializeSanitizerKinds(Opts.Sanitize)) GenerateArg(Consumer, OPT_fsanitize_EQ, Sanitizer); +if (

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
@@ -4002,6 +4022,24 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ), Diags, Opts.Sanitize); +if (const Arg *A = Args.getLastArg(options::OPT_e

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/146342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Joseph Huber via cfe-commits
@@ -3694,6 +3710,10 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_pic_is_pie); for (StringRef Sanitizer : serializeSanitizerKinds(Opts.Sanitize)) GenerateArg(Consumer, OPT_fsanitize_EQ, Sanitizer); +if (

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Joseph Huber via cfe-commits
@@ -4002,6 +4022,24 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ), Diags, Opts.Sanitize); +if (const Arg *A = Args.getLastArg(options::OPT_e

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Joseph Huber via cfe-commits
@@ -3679,6 +3679,22 @@ static StringRef GetInputKindName(InputKind IK) { llvm_unreachable("unknown input language"); } +static StringRef getExceptionHandlingName(unsigned EHK) { + switch (static_cast(EHK)) { + case LangOptions::ExceptionHandlingKind::None: + default: +

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Seems reasonable to me, some nits. https://github.com/llvm/llvm-project/pull/146342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/146342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Matt Arsenault (arsenm) Changes This will enable removal of a hack from the wasm backend in a future change. This feels unnecessarily clunky. I would assume something was automatically parsing this and propagating it in the C++ case

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#146343** https://app.graphite.dev/github/pr/llvm/llvm-project/146343?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#146342** https://app.graphite.dev/github/pr/llvm/llvm-p

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-06-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/146342 This will enable removal of a hack from the wasm backend in a future change. This feels unnecessarily clunky. I would assume something was automatically parsing this and propagating it in the C++ case, but I can'