aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-02-14 11:37:10 +0200
committerMartin Storsjö <martin@martin.st>2023-02-15 00:30:30 +0200
commit96fcaf0cc06a6f442b3e67a936ca04806bde1f03 (patch)
tree66f476cda771739db11ac63917d92935fb324168 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentcb5f239363a3c94db5425c105fcd45e77d2a16a9 (diff)
downloadllvm-96fcaf0cc06a6f442b3e67a936ca04806bde1f03.zip
llvm-96fcaf0cc06a6f442b3e67a936ca04806bde1f03.tar.gz
llvm-96fcaf0cc06a6f442b3e67a936ca04806bde1f03.tar.bz2
[openmp] Fix building for mingw targets after import library changes
06d9bf5e64d472db5485815d9c3f70631064bb25 (https://reviews.llvm.org/D143431) did a large restructuring of how the import library is created; previously, a second step to tweak the import library was only done for MSVC style targets, but after this commit, that logic was applied for mingw targets too. Since LIBOMP_GENERATED_IMP_LIB_FILENAME and LIBOMP_IMP_LIB_FILE are equal on mingw targets (both are "libomp.dll.a", while they are "libomp.dll.lib" and "libomp.lib" for MSVC targets), this caused a conflict, with errors like this: ninja: error: build.ninja:875: multiple rules generate runtime/src/libomp.dll.a [-w dupbuild=err] Skip the logic with a second step to recreate the import library for mingw targets. The MSVC specific logic for this relies on running the static archiver with CMAKE_LINK_DEF_FILE_FLAG, which with MS lib.exe (and llvm-lib) ignore the input object files and just generates an import library - but mingw style tools don't support this mode of operation. (By attemptinig the same, mingw tools would generate a static library with the def file as one member.) With mingw tools, the same can be achieved by invoking the dlltool executable instead. Instead of adding alternative logic for invoking dlltool, just skip the second import library step, since neither GNU nor LLVM mingw tools actually generate import libraries that link by ordinal - so there's no need for a second import library. Differential Revision: https://reviews.llvm.org/D143992
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions