Closed Bug 1133384 Opened 5 years ago Closed 5 years ago

Use /MaxILKSize to avoid LNK1248 fatal error

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 8.1
defect
Not set

Tracking

(firefox38 fixed)

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file, 1 obsolete file)

The LNK1248 "image size (80000000) exceeds maximum allowable size (80000000)" happens more frequently recently. It seems that Microsoft suggests passing the undocumented flag /MaxILKSize:2147483647 to work around [1]. Chromium met the same problem, and they have been using this flag since long ago [2].

[1] https://connect.microsoft.com/VisualStudio/feedback/details/1044914/fatal-error-lnk1248
[2] https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/ve7E2MbE9TY
Attached patch patch (obsolete) — Splinter Review
Attachment #8565695 - Flags: review?(mh+mozilla)
Comment on attachment 8565695 [details] [diff] [review]
patch

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

::: configure.in
@@ +2303,5 @@
>          dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
>          dnl Probably also a compiler bug, but what can you do?
>          PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
> +        dnl Use MaxILKSize to avoid LNK1248
> +        LDFLAGS="$LDFLAGS -DYNAMICBASE -MaxILKSize:2147483647"

Please make it VS2013update4-specific[1], and add the Microsoft connect url in a comment.

1. test "_CC_MAJOR_VERSION" = "18" -a "$_CC_BUILD_VERSION" = "31101"
Attachment #8565695 - Flags: review?(mh+mozilla) → feedback+
Attached patch patchSplinter Review
Attachment #8565695 - Attachment is obsolete: true
Attachment #8565802 - Flags: review?(mh+mozilla)
Comment on attachment 8565802 [details] [diff] [review]
patch

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

::: configure.in
@@ +2304,5 @@
>          dnl Probably also a compiler bug, but what can you do?
>          PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
>          LDFLAGS="$LDFLAGS -DYNAMICBASE"
> +        if test "$_CC_MAJOR_VERSION" = "18" -a "$_CC_BUILD_VERSION" = "31101"; then
> +            dnl Use MaxILKSize as a workaround for LNK1248

Please add a note that this is for VS2013update4 only (the build version is not as nice as explicitly writing it :) )
Attachment #8565802 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/a3642ea4fdf0
Assignee: nobody → quanxunzhen
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
I'm running VC 18.00.31101 and my local build is failing with this patch.

LINK : fatal error LNK1320: /MAXILKSIZE value 0x7FFFFFFF must be between 0x01000000 and 0x7FF00000
Flags: needinfo?(quanxunzhen)
It seems chromium met the same problem: https://code.google.com/p/chromium/issues/detail?id=446912

I guess you met this problem also because of using the IDE?

I have no idea... I cannot find any public official information about this error and even that flag. If you think it's serious, you can probably land another patch which makes that value done to the range, or just fix it locally.
Flags: needinfo?(quanxunzhen)
Depends on: 1134618
Blocks: 1333645
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.