This is an archive of the discontinued LLVM Phabricator instance.

Embed bitcode in object file (clang cc1 part)
AbandonedPublic

Authored by steven_wu on Feb 18 2016, 9:35 AM.

Details

Reviewers
None
Summary

Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1
option is used, clang will embed both the input bitcode and cc1
commandline into the bitcode in special sections before compiling to
the object file. Using -fembed-bitcode-marker will only introduce a
marker in both sections.

Don't emit uselist order for -fembed-bitcode

Embedded bitcode are embedded without serialization in their normal
flow. No uselist order need to be recorded.

Apply whitelist to options used in embedded bitcode

Add a whitelist for the options that are allowed to be used with
-fembed-bitcode. That is minimize the number of the cc1 command
that needs to be embedded in the object file.

Diff Detail

Event Timeline

steven_wu updated this revision to Diff 48344.Feb 18 2016, 9:35 AM
steven_wu retitled this revision from to Embed bitcode in object file (clang cc1 part).
steven_wu updated this object.
steven_wu added a subscriber: cfe-commits.
steven_wu abandoned this revision.Feb 18 2016, 9:39 AM

I accidentally send this patch with everything in it. I will send out patch in small chunks instead.