yxsamliu wrote: > > We need to support compression/uncompression of standalone bundled bitcode, > > and standalone bundled code objects that are not embedded in ELF or COFF > > binaries. An OS-neutral binary format is preferred. > > I think my ideal solution would be LLVM supporting some module metadata such > that a section emitted by the backend automatically uses an ELF compressed > section, though this wouldn't apply to LTO objects unfortunately. That being > said, it's not unreasonable to do this manually for this specified use-case. > > I see this introduces a new header to the bundled format, will this break any > backwards compatibility? I'm guessing old binaries can check for the LLVM > bitcode, ELF, or COFF magic directly instead. If that's the case I'd probably > recommend adding your magic number to the `file_magic` implementation.
Good point. The compiler and runtime are able to consume the offload bundle files created by the old compiler. If compression is not enabled, the old compiler and runtime will be able to consume it. However, old compiler and runtime will not be able to consume the compressed bundle. I have added recognizing the clang offload bundle (compressed and uncompressed) to the magic number. https://github.com/llvm/llvm-project/pull/67162 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits