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

RESOLVED FIXED in mozilla12

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jacek Caban, Assigned: Jacek Caban)

Tracking

Trunk
mozilla12
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 587676 [details] [diff] [review]
fix v1.0

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

5 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

5 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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.