Closed Bug 717224 Opened 9 years ago Closed 9 years ago

Misc libraries fail to link on mingw due to missing -luserenv

Categories

(Firefox Build System :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla12

People

(Reporter: jacek, Assigned: jacek)

Details

(Whiteboard: [inbound])

Attachments

(1 file)

Attached patch fix v1.0Splinter Review
MSVC builds use |#pragma comment(lib, "userenv.lib")| that is not supported in mingw. Since that file is compiled with many targets, maintaining it in OS_LIBS would be tricky. My patch adds userenv to default linked libraries. It won't affect targets that don't use it as it's skipped by linker if userenv is not used.
Attachment #587676 - Flags: review?(netzen)
If we're going to put it there I think we should remove the #pragma comment(lib, "userenv.lib") pls.
Attachment #587676 - Flags: review?(netzen)
(In reply to Brian R. Bondy [:bbondy] from comment #1)
> If we're going to put it there I think we should remove the #pragma
> comment(lib, "userenv.lib") pls.

Note that with my patch it's still needed. I've added linker option in configure only for mingw builds, MSVC builds still use #pragma. I can move MSVC imports to configure as well if you prefer.
Comment on attachment 587676 [details] [diff] [review]
fix v1.0

Review of attachment 587676 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry I didn't notice that, this looks good to me.
Attachment #587676 - Flags: review+
Thanks for the patch.
Thanks for the review, pushed to m-i:

https://hg.mozilla.org/integration/mozilla-inbound/rev/d13c738c54ce
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/d13c738c54ce
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.