Last Comment Bug 609431 - LNK4221 MSVC build warnings in js/src/ (object file does not define any previously undefined public symbols)
: LNK4221 MSVC build warnings in js/src/ (object file does not define any previ...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla9
Assigned To: Ed Morley [:emorley]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: buildwarning
  Show dependency treegraph
 
Reported: 2010-11-03 16:25 PDT by Ryan VanderMeulen [:RyanVM]
Modified: 2011-09-19 13:09 PDT (History)
1 user (show)
emorley: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (2.96 KB, patch)
2011-09-18 06:34 PDT, Ed Morley [:emorley]
khuey: review+
Details | Diff | Splinter Review

Description Ryan VanderMeulen [:RyanVM] 2010-11-03 16:25:10 PDT
This warning appeared in MSVC builds after a recent TM merge.
ExecutableAllocatorPosix.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
RegAlloc.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
jsinvoke.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
jsgcstats.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
Comment 1 Ed Morley [:emorley] 2011-09-18 05:01:45 PDT
Building locally with MSVC2010 using http://hg.mozilla.org/integration/mozilla-inbound/rev/f827e9173fea , I still get:

ExecutableAllocatorOS2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#428
- File: http://mxr.mozilla.org/mozilla-central/source/js/src/assembler/jit/ExecutableAllocatorOS2.cpp

ExecutableAllocatorPosix.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#426
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#1050
- File: http://mxr.mozilla.org/mozilla-central/source/js/src/assembler/jit/ExecutableAllocatorPosix.cpp

Logging.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#431
- File: http://mxr.mozilla.org/mozilla-central/source/js/src/methodjit/Logging.cpp

RegAlloc.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#294
- Include: http://mxr.mozilla.org/mozilla-central/source/js/src/Makefile.in#309
- File: http://mxr.mozilla.org/mozilla-central/source/js/src/nanojit/RegAlloc.h
- File: http://mxr.mozilla.org/mozilla-central/source/js/src/nanojit/RegAlloc.cpp

I'm presuming this just needs a bunch of platform specific ifdefs in js/src/Makefile.in to prevent them being included unnecessarily.
Comment 2 Ed Morley [:emorley] 2011-09-18 06:34:27 PDT
Created attachment 560785 [details] [diff] [review]
Patch v1

Adds a few OS and also MOZ_DEBUG specific ifdefs to js/src/Makefile.in to stop including files that don't do anything on certain platforms/when not building debug.

Builds fine locally (MSVC 2010) with the comment 1 warnings no longer showing; sent to try:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=590f59544006
Comment 4 Ed Morley [:emorley] 2011-09-19 13:09:38 PDT
https://hg.mozilla.org/mozilla-central/rev/2cef60b8a9c2

Note You need to log in before you can comment on or make changes to this bug.