It's a ghost town here :) ... I've sat with this for days kind of down on my luck ... but I think I figured out (see link in code) an incredibly simple and ideal solution by just adding the following code to the BUILD.gn file, which causes my test project to only show some link errors for Microsoft's Direct3D libraries, and doesn't have to link against the internal dependencies. In fact it would be trivial to add
the only obj/static.lib targets to this LIB so that consumers only have to link against a single static library, but that's up to you guys. (I'm still not sure what the existing ones are for, but I can see arguments for busting them up.) The magic here is
complete_static_lib. In fact what I was told about "
complete_static_lib" suggests that if it's not used the library may not work like a normal lib file for use with outside projects... the zlib.lib file was missing pieces because it doesn't use
complete_static_lib (I think it should be including some of its optional OBJ files in its "sources" like adler32_simd_ when it's really just including them by "deps".)
# EXPERIMENTAL
#NOTE it would be nice if libs like d3d9.lib could be
#included but I'm pretty sure there's no way to make
#that automatic with static libraries, so consumers
#must link against them (this is OBJ only)
angle_static_library("libANGLE_static") {
complete_static_lib = true
public_deps = [ ":libANGLE" ]
}
angle_static_library("libANGLE_with_capture_static") {
complete_static_lib = true
public_deps = [ ":libANGLE_with_capture" ]
}