Closed twoscomplement closed 9 years ago
Not in any elegant way; you can't really know when the build nodes for the objects are created that they will ultimately (only) be linked into a shared library.
All it takes is a CCFLAGS = { "-fPIC"; Config = "linux-*-*" }
in your tundra.lua
, so I'm hesitant to add some auto-glue for this. One of the design ideas of Tundra is that explicit is better than implicit.
Objects included in shared libs on x64 Linux need to be compiled with -fpic.
Is there a way to have tundra add -fpic to CCOPTS and CXXOPTS by default when building a shared lib? Seems like it would require a new env var and a little glue?