New issue
Advanced search Search tips

Issue 854849 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Windows cross builds on Linux fail due to "unknown tool 'msvc'"

Project Member Reported by thomasanderson@chromium.org, Jun 21 2018

Issue description

$ cat out/win_cross/args.gn
target_os = "win"
is_debug = false
is_component_build = false
use_jumbo_build = true

$ ninja -C out/win_cross/ -j1 chrome
ninja: Entering directory `out/win_cross/'
[1/22526] LIB obj/base/win/pe_image.lib
FAILED: obj/base/win/pe_image.lib 
ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link /lib /llvmlibthin /nologo /ignore:4221 /OUT:obj/base/win/pe_image.lib @obj/base/win/pe_image.lib.rsp
ninja: fatal: unknown tool 'msvc'
ninja: build stopped: subcommand failed.

 
Components: Build
Owner: tikuta@chromium.org
Bisected the issue to
https://chromium.googlesource.com/chromium/src/+/f7d47b7e8c03400343d4b6753ff79ade9d09ca68

tikuta@ ptal

Comment 3 by tikuta@chromium.org, Jun 21 2018

#2

Can I ask you to confirm that specifying empty string to linker_wrapper fix the issue?
linker_wrapper = "" in 
https://chromium.googlesource.com/chromium/src/+/f7d47b7e8c03400343d4b6753ff79ade9d09ca68%5E%21/#F0

If not, I will take deeper look.

Comment 4 by thakis@chromium.org, Jun 21 2018

We do need the env file for LIBPATH currently I'm afraid. (It's easy to remove on non-Win though.)

Maybe revert, I make us not use the wrapper on non-Win, and then you can reland? (Won't get to it tonight.)

Or you could try yourself, like so: https://cs.chromium.org/chromium/src/build/toolchain/win/setup_toolchain.py?type=cs&q=imsvc&sq=package:chromium&g=0&l=265

Comment 5 by thakis@chromium.org, Jun 21 2018

i.e. do this

https://cs.chromium.org/chromium/src/build/toolchain/win/setup_toolchain.py?type=cs&q=imsvc&sq=package:chromium&g=0&l=242

for LIB too, then print it at the end, and pass as sys_lib_flags here:

https://cs.chromium.org/chromium/src/build/toolchain/win/BUILD.gn?type=cs&q=imsvc&sq=package:chromium&g=0&l=387

and then pass to linker. (prepend each path with i think /libpath:)

Comment 6 by tikuta@chromium.org, Jun 21 2018

Status: Assigned (was: Available)
Thank you for the pointer.

Let me try to fix today or make revert if I couldn't.

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/054eb9147e0a877d52410a18c948035fa6062381

commit 054eb9147e0a877d52410a18c948035fa6062381
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Fri Jun 22 01:15:57 2018

Do not use wrapper for link in win cross build

This is follow up of
https://chromium.googlesource.com/chromium/src/+/f7d47b7e8c03400343d4b6753ff79ade9d09ca68

This CL specifies libpath explicitly for LIB directories.

Bug:  854849 , 787903
Change-Id: I9b65b0c0980af1f7eb4ece2ffbb31d8bde44e7ce
Reviewed-on: https://chromium-review.googlesource.com/1109452
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569486}
[modify] https://crrev.com/054eb9147e0a877d52410a18c948035fa6062381/build/toolchain/win/BUILD.gn
[modify] https://crrev.com/054eb9147e0a877d52410a18c948035fa6062381/build/toolchain/win/setup_toolchain.py

Comment 8 by tikuta@chromium.org, Jun 22 2018

Status: Fixed (was: Assigned)
Compile became success.
https://ci.chromium.org/buildbot/chromium.clang/linux-win_cross-rel/1963

Sign in to add a comment