Add Linkage specific macro

When using cpp-library plugin, how to add linkage specific macro?

I see examples adding macros to CppCompile task but I don’t see any way to get the linkage type from task to conditionally branch.