New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 682754 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

WinClang DLL cc build broken due to missing export

Project Member Reported by r...@chromium.org, Jan 19 2017

Issue description

This CL introduced an exported function that references an unexported function:
https://codereview.chromium.org/2636323002

The failure:
https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin64%28dll%29/builds/8378/steps/compile/logs/stdio

FAILED: cc_unittests.exe cc_unittests.exe.pdb 
C:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./cc_unittests.exe /PDB:./cc_unittests.exe.pdb @./cc_unittests.exe.rsp
tile_manager_unittest.obj : error LNK2019: unresolved external symbol "public: void __cdecl cc::TileManager::Signals::reset(void)" (?reset@Signals@TileManager@cc@@QEAAXXZ) referenced in function "private: virtual void __cdecl cc::`anonymous namespace'::TileManagerTest_AllWorkFinished_Test::TestBody(void)" (?TestBody@TileManagerTest_AllWorkFinished_Test@?A@cc@@EEAAXXZ)

./cc_unittests.exe : fatal error LNK1120: 1 unresolved externals


 

Comment 1 by h...@chromium.org, Jan 19 2017

Cc: krasin@chromium.org
Labels: -OS-Mac OS-Windows

Comment 2 by r...@chromium.org, Jan 19 2017

The quick fix is to add CC_EXPORT to struct Signals, but I thought we added logic to clang to avoid these kinds of problems.

Comment 3 by h...@chromium.org, Jan 19 2017

Yes, Clang r246338 is supposed to handle this.

If ResetSignalsForTesting() is dllimport as seen when compiling tile_manager_unittest.cc, the body should not be getting emitted as it references a non-dllexport function.

Maybe there's some flaw in how this is built, maybe it's not marked dllimport..

Comment 4 by h...@chromium.org, Jan 19 2017

> If ResetSignalsForTesting() is dllimport as seen when compiling tile_manager_unittest.cc, the body should not be getting emitted as it references a non-dllexport function.

I mean "non-*dllimport* function".

Comment 5 by h...@chromium.org, Jan 19 2017

Owner: h...@chromium.org
Status: Started (was: Unconfirmed)
It turns out Clang was just broken here. It should be fixed by r292522.

In the meantime, I've uploaded https://codereview.chromium.org/2640153006 to work around the problem.

Comment 6 by h...@chromium.org, Jan 19 2017

Blocking: 82385
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 19 2017

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

commit d43836ab1e9e7d511128f58e0009966b1ee78ffe
Author: hans <hans@chromium.org>
Date: Thu Jan 19 23:24:17 2017

Fix Win/Clang components build of cc_unittests

This works around a Clang bug by moving
TileManager::ResetSignalsForTesting() out-of-line
(see bug for details).

BUG= 682754 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2640153006
Cr-Commit-Position: refs/heads/master@{#444887}

[modify] https://crrev.com/d43836ab1e9e7d511128f58e0009966b1ee78ffe/cc/tiles/tile_manager.cc
[modify] https://crrev.com/d43836ab1e9e7d511128f58e0009966b1ee78ffe/cc/tiles/tile_manager.h

Comment 8 by h...@chromium.org, Jan 24 2017

Status: Fixed (was: Started)
My Clang fix from #5 was reverted, but relanded yesterday as r292856.

Sign in to add a comment