[cfe-dev] LTO 'plain static lib'

Domagoj Saric domagoj.saric at littleendian.com
Mon May 16 05:48:34 PDT 2011


Hi,

is it possible to create a static lib/archive (.lib/.a) that is built 
"internally" using LTO but that contains only plain 'machine-code' .obj 
files (no MC/LTO auxiliary data)? So far I haven't found I way to do this 
with Clang (or with MSVC and its LTCG for that matter)...
This is needed when you want to build a closed-source/commercial static lib 
package with "whole program optimization" enabled but do not want the 
LTO/LTCG data leaked into the resulting .a/.lib because this data, AFAIK, 
makes it much easier to reverse-engineer the original source (plus it makes 
the .a/.lib much larger and possibly makes it compiler or even 
compiler-version specific)...


ps. I realize this question is more for a 'Clang users' list but that one 
doesn't exist AFAICT...


--
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman 




More information about the cfe-dev mailing list