Commit Graph

3 Commits

Author SHA1 Message Date
Rintaro Ishizaki
bdd4c005e5 [Macros] Diagnose how ExternalMacroDefinition request was failed
Return the failure reason as the result.
2023-10-12 16:08:48 -07:00
Rintaro Ishizaki
ddee67cbde [Macros] Update executable plugin sandbox profile to prohibit file-read
Except for dylibs.
2023-02-27 14:39:40 -08:00
Rintaro Ishizaki
0e31393024 [Macros] Add executable plugin support
Executable compiler plugins are programs invoked by the host compiler
and communicate with the host with IPC via standard IO (stdin/stdout.)
Each message is serialized in JSON, prefixed with a header which is a
64bit little-endian integer indicating the size of the message.

* Basic/ExecuteWithPipe: External program invocation. Lik
  llvm::sys::ExecuteNoWait() but establishing pipes to the child's
  stdin/stdout
* Basic/Sandbox: Sandboxed execution helper. Create command line
  arguments to be executed in sandbox environment (similar to SwiftPM's
  pluging sandbox)
* AST/PluginRepository: ASTContext independent plugin manager
* ASTGen/PluginHost: Communication with the plugin. Messages are
  serialized by ASTGen/LLVMJSON

rdar://101508815
2023-02-22 10:22:14 -08:00