Lifting the core functionalities of the clang-offload-bundler into a
user-facing library/API. This will allow online and JIT compilers to
bundle and unbundle files without spawning a new process.
This NFC patch (1/4) lifts the classes and functions used to
implement the clang-offload-bundler into a separate
OffloadBundler.cpp, and defines three top-level API functions in
OfflaodBundler.h
BundleFiles() UnbundleFiles() UnbundleArchives()
In successive patches, we aim to:
- Refactor global command-line option variables (cl::opt, cl::list, cl::bool, etc.) out of the API and into a Config class that can be passed as a local argument.
- Refactor dependence on the bundler executable path into an optional parameter
- Move OffloadBundler.cpp and OffloadBundler.h into clang/lib/Driver and clang/include/clang/Driver
clang-format not found in user’s local PATH; not linting file.