dump_syms.exe doesn't link in a linux->win cross build |
|||
Issue descriptionthakis@thakis:~/src/chrome/src$ GYP_MSVS_VERSION=2017 time ninja -C out/gnwin -k 0 dump_syms.exe -d keeprsp ninja: Entering directory `out/gnwin' [1/1] LINK dump_syms.exe dump_syms.exe.pdb FAILED: dump_syms.exe dump_syms.exe.pdb python ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False ../../../../llvm-build-nolibcxx/bin/lld-link /nologo /OUT:./dump_syms.exe /PDB:./dump_syms.exe.pdb @./dump_syms.exe.rsp ../../../../llvm-build-nolibcxx/bin/lld-link: error: could not open diaguids.lib: No such file or directory ../../../../llvm-build-nolibcxx/bin/lld-link: error: could not open SDK/lib: No such file or directory ninja: build stopped: cannot make progress due to previous errors. dump_syms.exe.rsp looks like so: obj/breakpad/dump_syms/dia_util.obj obj/breakpad/dump_syms/guid_string.obj obj/breakpad/dump_syms/omap.obj obj/breakpad/dump_syms/pdb_source_line_writer.obj obj/breakpad/dump_syms/string_utils.obj obj/breakpad/dump_syms/dump_syms.obj diaguids.lib imagehlp.lib advapi32.lib comdlg32.lib dbghelp.lib delayimp.lib dnsapi.lib gdi32.lib kernel32.lib msimg32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib psapi.lib shell32.lib shlwapi.lib user32.lib usp10.lib uuid.lib version.lib wininet.lib winmm.lib winspool.lib ws2_32.lib /WX /DEBUG /MACHINE:X86 /SAFESEH /largeaddressaware /fastfail /FIXED:NO /ignore:4199 /ignore:4221 /NXCOMPAT /DYNAMICBASE:NO /INCREMENTAL /SUBSYSTEM:CONSOLE,5.01 /LIBPATH:../../third_party/depot_tools/win_toolchain/vs_files/9bc7ccbf9f4bd50d4a3bd185e8ca94ff1618de0b/DIA\ SDK/lib /LIBPATH:/usr/local/google/home/thakis/src/llvm-build-nolibcxx/lib/clang/6.0.0/lib/windows /LIBPATH:../../third_party/depot_tools/win_toolchain/vs_files/9bc7ccbf9f4bd50d4a3bd185e8ca94ff1618de0b/win_sdk/Lib/winv6.3/um/x86 /LIBPATH:../../third_party/depot_tools/win_toolchain/vs_files/9bc7ccbf9f4bd50d4a3bd185e8ca94ff1618de0b/VC/lib /LIBPATH:../../third_party/depot_tools/win_toolchain/vs_files/9bc7ccbf9f4bd50d4a3bd185e8ca94ff1618de0b/VC/atlmfc/lib ~ ~ Note the "DIA\ SDK/lib" bit therein. I think this is the same issue for lld-link that we solved for clang-cl in bug 600223 . In particular, https://bugs.chromium.org/p/chromium/issues/detail?id=600223#c8 I think we should give lld-link a --rsp-quoting flag too, hook that up in https://github.com/llvm-mirror/lld/blob/7062c4c7dc9711cfe4c4770bba4dc8c5e961b33e/COFF/DriverUtils.cpp#L773 , and pass it when cross-compiling chrome/win from a non-Windows host. I'll make a patch for lld.
,
Sep 4 2017
lld patch: https://reviews.llvm.org/D37452 Things link fine with that and --rsp-quoting=posix passed to lld-link invocations when on a posix host.
,
Sep 5 2017
Landed in llvm r312594.
,
Sep 7 2017
,
Sep 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e7d403ebcfc4038241483370bd3bebb2ee606ee1 commit e7d403ebcfc4038241483370bd3bebb2ee606ee1 Author: Nico Weber <thakis@chromium.org> Date: Tue Sep 12 09:50:29 2017 win/cross: Pass --rsp-quoting=posix to lld as well. Else lld gets confused about `/LIBPATH:..../DIA\ SDK/lib` in the rsp file for dump_syms.exe and fails to link it. See https://bugs.chromium.org/p/chromium/issues/detail?id=600223#c8 for discussion about the approach taken. lld-lib doesn't understand --rsp-quoting yet, so only pass this to link, not to lib. Luckily, we don't have files with spaces in their path in lib files in the build. Bug: 761850 Change-Id: I628439fa4103c8150a324ee314c4cfe5b259adb5 Reviewed-on: https://chromium-review.googlesource.com/659162 Reviewed-by: Peter Collingbourne <pcc@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#501228} [modify] https://crrev.com/e7d403ebcfc4038241483370bd3bebb2ee606ee1/build/toolchain/win/BUILD.gn
,
Sep 12 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by thakis@chromium.org
, Sep 4 2017