[CMakeDriver]link static/shared libgc