On 26 May 2017 at 23:06, Kinney, Michael D <[email protected]> wrote: > Felix, > > Yes. I agree. I will work on a Bugzilla issue for this topic > and I prefer the idea of updating Base.h to check _MSC_VER value. > > The one challenge is that 'static' could be added in front of > GLOBAL_REMOVE_IF_UNREFERENCED, and it will build correctly with > VS2012 and newer, but would fail with older VS versions that > require __declspec(selectany) for size optimization. >
As has been pointed out already in this thread (by Laszlo, I think), STATIC may trigger 'unused symbol' warnings that break the build under our warnings-as-errors policy, since the compiler can infer that no external references exist. So while STATIC is absolutely the way forward, #define'ing it in a way that affects existing code is likely to cause problems. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

