Unverified Commit e2b896aa authored by Yi Wu's avatar Yi Wu Committed by GitHub
Browse files

[flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (#74077)



This patch add support of intrinsics Fortran 2008 EXECUTE_COMMAND_LINE.
The patch contains both the lowering and the runtime code and works on
both Windows and Linux. The patch contains a list of commits, to convey
the authorship and the history of changes. Some implementation specifics
or status has been added to `flang/docs/Intrinsics.md`.

I have provided a summary of the usage and the options required for the
`EXECUTE_COMMAND_LINE intrinsic`. The intrinsic supports both a
synchronous
(by default) and an asynchronous option.

| System  | Mode  | Implemention              |
|---------|-------|---------------------------|
| Linux   | Sync  | std::system()             |
| Windows | Sync  | std::system()             |
| Linux   | Async | fork()  |
| Windows | Async | CreateProcess             |

Support for the SYSTEM GNU extension will be added in a separate PR.

Co-authored with @jeffhammond

---------

Signed-off-by: default avatarJeff Hammond <jeff.science@gmail.com>
Co-authored-by: default avatarJeff Hammond <jeff.science@gmail.com>
Co-authored-by: default avatarYi Wu <yiwu02@wdev-yiwu02.arm.com>
parent a26cc759
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment