[clang] [llvm] [ARM] Add support for Windows SEH (PR #184953)

Trung Nguyen via cfe-commits cfe-commits at lists.llvm.org
Mon May 18 06:08:09 PDT 2026


trungnt2910 wrote:

```
2026-05-18T12:31:18.8647366Z /__w/llvm-project/llvm-project/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_common_utils -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_NO_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/__w/llvm-project/llvm-project/flang-rt/include -I/__w/llvm-project/llvm-project/flang-rt/../flang/include -I/__w/llvm-project/llvm-project/build/runtimes/runtimes-bins/flang-rt -I/__w/llvm-project/llvm-project/cmake/Modules/../../libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -fno-lto -fno-exceptions -fno-rtti -funwind-tables -fno-asynchronous-unwind-tables -include/__w/llvm-project/llvm-project/flang-rt/lib/runtime/stl-overrides.h -Wp,-U_GLIBCXX_ASSERTIONS -Wp,-U_LIBCPP_ENABLE_ASSERTIONS -MD -MT flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/exceptions.cpp.o -MF flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/exceptions.cpp.o.d -o flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/exceptions.cpp.o -c /__w/llvm-project/llvm-project/flang-rt/lib/runtime/exceptions.cpp
2026-05-18T12:31:18.8654222Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/exceptions.cpp:91:3: error: 'feclearexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:18.8655625Z    91 |   feclearexcept(excepts);
2026-05-18T12:31:18.8656641Z       |   ^~~~~~~~~~~~~~~~~~~~~~
2026-05-18T12:31:18.8657972Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/exceptions.cpp:98:3: error: 'feraiseexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:18.8658974Z    98 |   feraiseexcept(excepts);
2026-05-18T12:31:18.8659269Z       |   ^~~~~~~~~~~~~~~~~~~~~~
2026-05-18T12:31:18.8660226Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/exceptions.cpp:108:10: error: 'fetestexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:18.8661265Z   108 |   return fetestexcept(excepts);
2026-05-18T12:31:18.8661576Z       |          ^~~~~~~~~~~~~~~~~~~~~
2026-05-18T12:31:18.8661851Z 3 errors generated.
2026-05-18T12:31:19.1172350Z [2646/2783] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/__w/llvm-project/llvm-project/flang/lib/Decimal/binary-to-decimal.cpp.o
2026-05-18T12:31:19.1909178Z [2647/2783] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/descriptor.cpp.o
2026-05-18T12:31:19.2319083Z [2648/2783] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o
2026-05-18T12:31:19.2320958Z FAILED: flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o 
2026-05-18T12:31:19.2326534Z /__w/llvm-project/llvm-project/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_common_utils -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_NO_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/__w/llvm-project/llvm-project/flang-rt/include -I/__w/llvm-project/llvm-project/flang-rt/../flang/include -I/__w/llvm-project/llvm-project/build/runtimes/runtimes-bins/flang-rt -I/__w/llvm-project/llvm-project/cmake/Modules/../../libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -fno-lto -fno-exceptions -fno-rtti -funwind-tables -fno-asynchronous-unwind-tables -include/__w/llvm-project/llvm-project/flang-rt/lib/runtime/stl-overrides.h -Wp,-U_GLIBCXX_ASSERTIONS -Wp,-U_LIBCPP_ENABLE_ASSERTIONS -MD -MT flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o -MF flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o.d -o flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/edit-input.cpp.o -c /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp
2026-05-18T12:31:19.2332770Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:580:5: error: 'feraiseexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:19.2333731Z   580 |     RAISE(FE_OVERFLOW);
2026-05-18T12:31:19.2334011Z       |     ^~~~~~~~~~~~~~~~~~
2026-05-18T12:31:19.2334510Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:572:15: note: expanded from macro 'RAISE'
2026-05-18T12:31:19.2335065Z   572 | #define RAISE std::feraiseexcept
2026-05-18T12:31:19.2335363Z       |               ^
2026-05-18T12:31:19.2336483Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:585:5: error: 'feraiseexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:19.2337474Z   585 |     RAISE(FE_UNDERFLOW);
2026-05-18T12:31:19.2337796Z       |     ^~~~~~~~~~~~~~~~~~~
2026-05-18T12:31:19.2338261Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:572:15: note: expanded from macro 'RAISE'
2026-05-18T12:31:19.2338770Z   572 | #define RAISE std::feraiseexcept
2026-05-18T12:31:19.2339057Z       |               ^
2026-05-18T12:31:19.2339933Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:590:5: error: 'feraiseexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:19.2340885Z   590 |     RAISE(FE_INEXACT);
2026-05-18T12:31:19.2341148Z       |     ^~~~~~~~~~~~~~~~~
2026-05-18T12:31:19.2341670Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:572:15: note: expanded from macro 'RAISE'
2026-05-18T12:31:19.2342180Z   572 | #define RAISE std::feraiseexcept
2026-05-18T12:31:19.2342477Z       |               ^
2026-05-18T12:31:19.2343396Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:595:5: error: 'feraiseexcept' used without enabling floating-point exception behavior; use 'pragma STDC FENV_ACCESS ON' or compile with '-ffp-exception-behavior=maytrap' [-Werror,-Wfenv-access]
2026-05-18T12:31:19.2344312Z   595 |     RAISE(FE_INVALID);
2026-05-18T12:31:19.2344579Z       |     ^~~~~~~~~~~~~~~~~
2026-05-18T12:31:19.2345028Z /__w/llvm-project/llvm-project/flang-rt/lib/runtime/edit-input.cpp:572:15: note: expanded from macro 'RAISE'
2026-05-18T12:31:19.2345572Z   572 | #define RAISE std::feraiseexcept
2026-05-18T12:31:19.2345849Z       |               ^
2026-05-18T12:31:19.2346174Z 4 errors generated.
```

This is clearly not my fault. Last month, running from the same merge base did not fail.
Will wait for a while before rebasing.

https://github.com/llvm/llvm-project/pull/184953


More information about the cfe-commits mailing list