-
由 Megvii Engine Team 提交于
as some reason: some version of trt/cudnn need -Wl,--whole-archive attribute to fix cuda issue, target A(CMAKE OBJECT,eg megbrain/megdnn): -Wl,--whole-archive depend on trt/cudnn target B(SHARED LIBS,eg libmegengine.so) --> A with `PUBLIC` depends target C(SHARED LIBS,eg _impertive.so) --> B with `PUBLIC` depends, then ld will force link fatbin section into C, which will be undesired what`s more, attribute PUBLIC/PRIVATE do not take effect to OBJECT library(megbrain/megdnn) what`s more, megengine/megengine_export have to PUBLIC for mgb/imperative target, as SRC/include depends so we pull cudalib depend from megbrain/megdnn to megengine/megengine_export on linux os, to finall target at windows os, for example lar on windows GitOrigin-RevId: b278a69e1cdcc17cfd22da80247af3fe30f6d4e8
ae8b38f6