pytorch
fd1a4f18 - [pytorch] update code analyzer build.sh to handle srcs with same name (#32525)

Commit
4 years ago
[pytorch] update code analyzer build.sh to handle srcs with same name (#32525) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32525 Before calling static code analyzer we need link all bitcode files into a single module. Current approach is a bit hacky: cmake still calls "ar" to pack bitcode files into archives, then we manually unpack these archives and call llvm-link. Turns out libtorch_cpu.a contains a few files with same name, e.g.: ``` aten/src/ATen/native/SoftMax.cpp aten/src/ATen/native/mkldnn/SoftMax.cpp ``` "ar x" will only keep one of them and cause inaccurate analysis result. Use this temporary hack to workaround the problem. Ideally should merge this step into cmake (e.g. directly calling llvm-link to produce target output?). Differential Revision: D19530533 Pulled By: ljk53 fbshipit-source-id: 94b292c241abaaa0ff4a23059882abdc3522971e
Author
Parents
Loading