<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/136535>136535</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Flang on Windows AArch64: LLVM ERROR: INIT_TRAMPOLINE operation is only supported on Linux.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hmartinez82
</td>
</tr>
</table>
<pre>
While building the json-fortran project targeting `aarch64-w64-windows-gnu`:
```
[1/8] C:\msys64\clangarm64\bin\flang.exe -IC:\Dev\Github\MINGW-packages\mingw-w64-json-fortran\src\json-fortran-9.0.2\src -IC:\Dev\Github\MINGW-packages\mingw-w64-json-fortran\src\build-CLANGARM64\include -O3 -module-dir. -ffixed-line-length-72 -c CMakeFiles\jsonfortran.dir\src\json_value_module.F90-pp.f90 -o CMakeFiles\jsonfortran.dir\src\json_value_module.F90.obj
FAILED: CMakeFiles/jsonfortran.dir/src/json_value_module.F90.obj json_value_module.mod
C:\msys64\clangarm64\bin\flang.exe -IC:\Dev\Github\MINGW-packages\mingw-w64-json-fortran\src\json-fortran-9.0.2\src -IC:\Dev\Github\MINGW-packages\mingw-w64-json-fortran\src\build-CLANGARM64\include -O3 -module-dir. -ffixed-line-length-72 -c CMakeFiles\jsonfortran.dir\src\json_value_module.F90-pp.f90 -o CMakeFiles\jsonfortran.dir\src\json_value_module.F90.obj
LLVM ERROR: INIT_TRAMPOLINE operation is only supported on Linux.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: C:/msys64/clangarm64/bin/flang -fc1 -triple aarch64-w64-windows-gnu -emit-obj -I C:\\Dev\\Github\\MINGW-packages\\mingw-w64-json-fortran\\src\\json-fortran-9.0.2\\src -I C:\\Dev\\Github\\MINGW-packages\\mingw-w64-json-fortran\\src\\build-CLANGARM64\\include -ffixed-line-length=72 -mrelocation-model pic -pic-level 2 -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -fversion-loops-for-stride -module-dir . -resource-dir C:/msys64/clangarm64/lib/clang/20 -mframe-pointer=none -O3 -o CMakeFiles\\jsonfortran.dir\\src\\json_value_module.F90.obj -x f95-cpp-input CMakeFiles\\jsonfortran.dir\\src\\json_value_module.F90-pp.f90
1. Running pass 'Function Pass Manager' on module 'FIRModule'.
2. Running pass 'AArch64 Instruction Selection' on function '@_QMjson_value_modulePjson_check_all_for_duplicate_keys'
Exception Code: 0xC000001D
#0 0x00007ffda6cf9928 HandleAbort (C:\msys64\clangarm64\bin\libLLVM-20.dll+0xc59928)
#1 0x00007ffe7647ae50 (C:\Windows\System32\ucrtbase.dll+0x7ae50)
#2 0x8e39fffe7647ba5c
flang: error: flang frontend command failed due to signal (use -v to see invocation)
flang version 20.1.3
Target: aarch64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/clangarm64/bin
flang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
flang: note: diagnostic msg: C:/msys64/tmp/json_value_module-0fd919
flang: note: diagnostic msg: C:/msys64/tmp/json_value_module-0fd919.sh
flang: note: diagnostic msg:
********************
ninja: build stopped: subcommand failed.
```
Attached are the two files, and also `json_value_module.F90` preprocessed
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsV11v2zoS_TXMy4ACTVv-ePCD4kSpAedjE-_2MaCpkcyGIgWScp399QtKSuqbuneLbS-wD9dQEGtEnyGH5xyOhPeqMohLkl6S9OpCtGFv3XJfCxeUwX_P-cXOFq_Lz3ulEXat0oUyFYQ9whdvDS2tC04YaJz9gjJAEK7CEIeQKRPCyf10Qr_GP2UK-9XTyrRkysg4I6y7pmy4WEbSyxHh-ZykV7CKI9JV7V_9dELSldTCVMLV3c1OGZKuyhhK8IhA18PwKzyQdHWjwr7dkXR1u767-UwbIV9EhT7C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