<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/84066>84066</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] OpenMP offload missing driver option
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ye-luo
</td>
</tr>
</table>
<pre>
clang supports `-Xopenmp-target=` but flang-new doesn't
```
$ flang-new -c -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 -O3 dualspace.f90
flang-new: error: unknown argument: '-Xopenmp-target=amdgcn-amd-amdhsa'
flang-new: error: cannot determine amdgcn architecture: /soft/compilers/llvm/main-20240305/bin/amdgpu-arch: ; consider passing it via '-march'
```
I knew that
```
flang-new -c -fopenmp --offload-arch=gfx906 -O3 dualspace.f90
```
works. Please support `-Xopenmp-target` for sending accurate options to the offload pass.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01vrDgQ_DXm0gI5NgPDgcNEI6Q9rJLjXhu7AW_ARrZJNv9-ZZgkT-_N-5BAMqhdXdVVjSGY0RK17PTITtcMtzg5375TPm8u651-b9WMdoSwravzMQCreP6PW8kuax7RjxSZvLKKQ79FGFJtbukNtKNgmagj41fGL6zit-f4FOU3tbmCfDggPw837MDkFRc9KpvjotM7BYQfCdypWdCricnrOPzX8AryJwl6wzmsqKgYGg4HlU8aTF6AvHc-HTb7Yt2bBfTjtpCN6R8T9R80ZqL-FbBCa10ETZH8YizBAQCJrImk4ubpaNYFN0QmOuWW1czkAxPdPL8uTHQLGpsLLkou-YmJrjeWiS4hrVt-yL4Ak4-gnA1Gk4c1GW1HMBFeDe5Sjvl8sP3OoL_gJTkTJ7xv4E_My90wzA51_pvZ38V8c_4lFPA8Ewb6CBzcC1zFYXAeAlmdRKFSm8dI4NZonA0QHcSJ4EZmF19kupW6kQ1m1D7UvKlq_lDKbGpRlY1uZK_PCk-adF1iX_eo-wrPKE8iM-3HqAUXQsjiLPkD8mpo6pKaijes5LSgmYtkT-H8mJkQNmrPJa-qbMae5rAvmBD73JgQadd8m-rzfhsDK_lsQgxfCNHEed_Kbr9xusLTSvbv509Rizkc1d68kr9JzzY_t1OMa2DywkTHRDeaOG19odzylZ-97-rdv6RSwna2KV474f8DAAD__9oBTdY">