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

RESOLVED FIXED in mozilla12

Status

defect
RESOLVED FIXED
8 years ago
Last year

People

(Reporter: jacek, Assigned: jacek)

Tracking

Trunk
mozilla12
x86
Windows 7

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

Assignee

Description

8 years ago
Posted 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)
Assignee

Comment 2

8 years ago
(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.
Assignee

Comment 5

8 years ago
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: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.