<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>83068</bug_id>
          
          <creation_ts>2012-04-03 14:11:56 -0700</creation_ts>
          <short_desc>enable ULDI with incremental linking of webkit</short_desc>
          <delta_ts>2012-04-03 18:51:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Pranke">dpranke</reporter>
          <assigned_to name="Dirk Pranke">dpranke</assigned_to>
          <cc>abarth</cc>
    
    <cc>dglazkov</cc>
    
    <cc>scottmg</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>594873</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:11:56 -0700</bug_when>
    <thetext>disable incremental linking for debug of webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594877</commentid>
    <comment_count>1</comment_count>
      <attachid>135425</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:14:29 -0700</bug_when>
    <thetext>Created attachment 135425
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594879</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:17:07 -0700</bug_when>
    <thetext>I&apos;m not 100% sure this is the right long-term fix, but in theory this should at least fix the compile errors we&apos;re seeing on the debug win bots. If it does, we can double check this and see that this is right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594880</commentid>
    <comment_count>3</comment_count>
      <attachid>135425</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:18:08 -0700</bug_when>
    <thetext>Comment on attachment 135425
Patch

Clearing flags on attachment: 135425

Committed r113087: &lt;http://trac.webkit.org/changeset/113087&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594881</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:18:12 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594882</commentid>
    <comment_count>5</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-04-03 14:19:51 -0700</bug_when>
    <thetext>I don&apos;t understand. Is incremental_chrome_dll not getting set properly in common.gypi?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594907</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Graham">scottmg</who>
    <bug_when>2012-04-03 14:37:11 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;m not 100% sure this is the right long-term fix, but in theory this should at least fix the compile errors we&apos;re seeing on the debug win bots. If it does, we can double check this and see that this is right.

I don&apos;t understand either. Shouldn&apos;t it be &apos;false&apos; if we&apos;re disabling it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594909</commentid>
    <comment_count>7</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2012-04-03 14:38:10 -0700</bug_when>
    <thetext>The bots are still failing: http://build.chromium.org/p/chromium.webkit/builders/Win%20%28dbg%29

I am trying to clobber to see if it helps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594925</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 14:54:42 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; I don&apos;t understand. Is incremental_chrome_dll not getting set properly in common.gypi?

(In reply to comment #6)
&gt; I don&apos;t understand either. Shouldn&apos;t it be &apos;false&apos; if we&apos;re disabling it?

So, the way things are currently, we enable incremental linking (but not ULDI) in debug build, and incremental_chrome_dll is set to False. So, prior to this patch, ULDI was not being enabled for webkit.dll.

The problem we&apos;re seeing is that we&apos;re trying to export a symbol from a file in webcore_platform, and nothing else in webkit.dll references anything in that file, so the linker would normally treat that file as dead code and strip it.

My understanding of the flags is that by enabling ULDI, we force the linker to include all of the objects in the archive, regardless of whether or not they&apos;re referenced by something else in the DLL.

Obviously, this may have side effects, which is why I&apos;m not sure that this is the right long-term fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594935</commentid>
    <comment_count>9</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-04-03 15:02:03 -0700</bug_when>
    <thetext>If I understand you correctly, you&apos;re saying the bug title is wrong (causing Scott&apos;s confusion) and the gyp variable incremental_chrome_dll does not control whether we link incrementally or not (causing my confusion).

Are you saying we should remove incremental_chrome_dll from all the gyp files and assume incremental linking all the time?  Is there some other gyp variable we should be checking instead (or in addition to incremental_chrome_dll)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594942</commentid>
    <comment_count>10</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 15:12:19 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; If I understand you correctly, you&apos;re saying the bug title is wrong (causing Scott&apos;s confusion)

Oy. Yes. My fault, I&apos;ve updated the subject correctly - the fix was to turn ULDI on, not turn incremental linking off.

&gt; and the gyp variable incremental_chrome_dll does not control whether we link incrementally or not (causing my confusion).
&gt; 

That is correct. It only controls whether we link chrome.dll incrementally. I suspect it was a hack that it was in webkit.gyp at all, but possibly a hack needed for the same reasons.

&gt; Are you saying we should remove incremental_chrome_dll from all the gyp files and assume incremental linking all the time? 

No, but there&apos;s only a couple of linkables where this problem shows up - the main one being chrome.dll. The problem is that incremental linking doesn&apos;t play nicely with a DLL comprised of multiple .libs, where the DLL exports symbols from multiple libs that it doesn&apos;t use itself.

One way to fix this is to not use .libs at all, and just build the DLL directly from a list of source files; this is what I ended up doing in content (and this is basically what ULDI is doing), but I&apos;m not sure if this would work in webkit since it&apos;s so much bigger (we might run into command line length issues and have to do something like what Scott did w/ supalink).

&gt; Is there some other gyp variable we should be checking instead (or in addition to incremental_chrome_dll)?

I&apos;m not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>594995</commentid>
    <comment_count>11</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2012-04-03 16:04:33 -0700</bug_when>
    <thetext>Reverted r113087 for reason:

Breaks Windows builds in other unpredictable ways.

Committed r113103: &lt;http://trac.webkit.org/changeset/113103&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>595125</commentid>
    <comment_count>12</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-04-03 18:51:05 -0700</bug_when>
    <thetext>We worked around the issue in r113105 for now ... I will close this as WONTFIX (since it&apos;s probably not the right thing to do) and open a different bug for the underlying problem.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>135425</attachid>
            <date>2012-04-03 14:14:29 -0700</date>
            <delta_ts>2012-04-03 14:18:08 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-83068-20120403141428.patch</filename>
            <type>text/plain</type>
            <size>1706</size>
            <attacher name="Dirk Pranke">dpranke</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTEzMDY4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L2No
cm9taXVtL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Vy
aXR5T3JpZ2luCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L2Nocm9taXVtL1dlYktpdC5neXAg
Yi9Tb3VyY2UvV2ViS2l0L2Nocm9taXVtL1dlYktpdC5neXAKaW5kZXggZTAyYTIzY2E2MTE5MTZj
OTU1YWIxOWZmZTI4OGJmM2NmNTkzNDFiMy4uZjkwZDA2ZGJlOTVmZTM0NWJhZWM0NmJkNjA4NTIy
MDhiNDgwZWJlYyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdC9jaHJvbWl1bS9XZWJLaXQuZ3lw
CisrKyBiL1NvdXJjZS9XZWJLaXQvY2hyb21pdW0vV2ViS2l0Lmd5cApAQCAtNzQ3LDExICs3NDcs
NyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgJ21zdnNfc2V0dGluZ3MnOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAnVkNMaW5rZXJUb29sJzogewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29u
ZGl0aW9ucyc6IFsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbJ2luY3JlbWVu
dGFsX2Nocm9tZV9kbGw9PTEnLCB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAnVXNlTGlicmFyeURlcGVuZGVuY3lJbnB1dHMnOiAidHJ1ZSIsCi0gICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgfV0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0s
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVc2VMaWJyYXJ5RGVwZW5kZW5jeUlu
cHV0cyc6ICJ0cnVlIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgICAgIH1dLAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>