On 04/04/2010 18:53, Charles Wilson wrote: > One thing I worry about -- but can't test on my platform, since cygwin's > compiler is not up to the latest-and-greatest yet so doesn't yet support > LTO -- is whether this bit, in the cwrapper, will break: > > const char * MAGIC_EXE = "$magic_exe";
> It's been my understanding that sticking random static variables into an > application, when that variable is never accessed by the app's code, is > one of the things that gets "optimized out" by LTO. > > Can anybody confirm that this sort of thing will continue to work, even > with LTO turned on? There's surely no need to build the wrapper with LTO just because the target application is built that way? As for whether it would get dropped if you did, I'd imagine that's quite plausible; you might want to add a volatile qualifier. cheers, DaveK