<?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>109248</bug_id>
          
          <creation_ts>2013-02-07 19:20:38 -0800</creation_ts>
          <short_desc>[Mac] Experimental gyp-based build system</short_desc>
          <delta_ts>2013-04-05 01:07:20 -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>WebKit Misc.</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="Mark Rowe (bdash)">mrowe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>aroben</cc>
    
    <cc>cbiesinger</cc>
    
    <cc>dino</cc>
    
    <cc>dpranke</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>eric</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>mark</cc>
    
    <cc>mjs</cc>
    
    <cc>shezbaig.wk</cc>
    
    <cc>thakis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>828107</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-07 19:20:38 -0800</bug_when>
    <thetext>As discussed on webkit-dev, we should attempt to bring up a gyp-based build system for the Mac. This will help us determine if there are any limitations in gyp that need to be addressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828110</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-07 19:29:07 -0800</bug_when>
    <thetext>I started experimenting with this today by setting up gyp to generate an Xcode project for WTF that matches the structure and configuration of the current Xcode project. This should help minimize any changes in build behavior. I believe I&apos;ve got things set up in such a way that they work for engineering builds (&quot;xcodebuild -configuration Debug&quot; or &quot;xcodebuild -configuration Release&quot;). I&apos;m struggling to get a project that works for our production builds though, unless I move the .gyp file to the top level of the WTF directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828117</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-02-07 19:51:57 -0800</bug_when>
    <thetext>what setting in xcode controls where the project directory is set? Put differently, what setting in the generated wtf.xcodeproj is wrong, and what is the corresponding setting in the checked-in wtf.xcodeproj?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828126</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-07 20:12:18 -0800</bug_when>
    <thetext>projectDirPath on the project object gets set to the path containing the .gyp file:
  projectDirPath = WTF.gyp/mac;

This causes SRCROOT to get set to Source/WTF/WTF.gyp/mac, which is bogus. SRCROOT is supposed to point to the top level directory containing the source (Source/WTF).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828132</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-07 20:16:15 -0800</bug_when>
    <thetext>Maybe I&apos;m invoking gyp wrong? In order to get it to spit the Xcode project out at the right location I&apos;m doing:

  cd WTF.gyp/mac &amp;&amp; gyp --generator-output=../.. -f xcode --depth=. WTF.gyp

If I run gyp from the top level directory and specify &quot;.&quot; as the output directory then I don&apos;t get the bogus projectDirPath value, but the Xcode project ends up in a subdirectory rather than where I wanted it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828139</commentid>
    <comment_count>5</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-02-07 20:32:16 -0800</bug_when>
    <thetext>it&apos;s a bit hard to say what&apos;s wrong. Can you post the WT.gyp you&apos;re using?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828140</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-02-07 20:32:28 -0800</bug_when>
    <thetext>(WTF.gyp, rather).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828143</commentid>
    <comment_count>7</comment_count>
      <attachid>187227</attachid>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-07 20:34:51 -0800</bug_when>
    <thetext>Created attachment 187227
WTF.gyp for Mac

I&apos;ve attached a patch that shows the gyp file I&apos;m experimenting with for WTF in case anyone wants to take a look. I&apos;ve tweaked the &quot;Copy WTF Headers&quot; script phase to dump out the value of SRCROOT and gyp&apos;s project_dir. This shows that no matter where I generate the .xcodeproj to, gyp tweaks the projects projectDirPath such that SRCROOT is always incorrect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828207</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2013-02-07 22:42:36 -0800</bug_when>
    <thetext>Okay, I have reproduced this. I think what&apos;s going on is that GYP uses the location of the .gyp file as the current working directory for any relative paths, and in order for that to translate most easily into the xcodeproject, we set the projectDirPath to match the directory containing the gyp file.

As you say, it does look like projectDirPath/SRCROOT is supposed to be the directory containing the .xcodeproj. When that is not the same as the directory containing the .gyp file, you&apos;re gonna have problems.

At this point, I can&apos;t say why gyp does this, and we&apos;d probably need to check w/ Mark Mentovai (or maybe Nico), since my knowledge of both xcode and the gyp xcode generator is pretty weak. Perhaps the thing to do is to adjust the xcode gyp generator to make sure the relative paths are based on the directory containing the .xcodeproj, not the directory containing the .gyp . Or, maybe there&apos;s a reason it needs to be this way, dunno.

Generally speaking, we always put the .xcodeproj&apos;s next to the .gyp files. So, for you to get something to work, you could probably work around this by moving your WTF.gyp from Source/WTF/WTF.gyp/mac/WTF.gyp to just Source/WTF . If we do eventually go down the &quot;everyone uses gyp&quot; route, that seems like the better thing to do anyway.

Hope this helps and I haven&apos;t written anything wrong here, but if I have hopefully Mark Mentovai or Nico will correct me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828347</commentid>
    <comment_count>9</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-08 02:03:48 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Generally speaking, we always put the .xcodeproj&apos;s next to the .gyp files. So, for you to get something to work, you could probably work around this by moving your WTF.gyp from Source/WTF/WTF.gyp/mac/WTF.gyp to just Source/WTF . If we do eventually go down the &quot;everyone uses gyp&quot; route, that seems like the better thing to do anyway.


This seems like a reasonable workaround while I&apos;m experimenting with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>832346</commentid>
    <comment_count>10</comment_count>
      <attachid>187227</attachid>
    <who name="Nico Weber">thakis</who>
    <bug_when>2013-02-13 14:26:08 -0800</bug_when>
    <thetext>Comment on attachment 187227
WTF.gyp for Mac

View in context: https://bugs.webkit.org/attachment.cgi?id=187227&amp;action=review

&gt; Source/WTF/WTF.gyp/mac/WTF.gyp:7
&gt; +      &apos;xcode_config_file&apos;: &apos;&lt;(project_dir)/Configurations/Base.xcconfig&apos;,

Just FYI: xcode_config_file works for the xcode backend of gyp, but there&apos;s no support for it in the make and ninja generators. There&apos;s http://crbug.com/90043 open for adding support, but we ended up not needing it for chromium, so we didn&apos;t implement that.

Just copying the contents of the xcconfig into an xcode_settings block doesn&apos;t quite work either, because the conditional syntax used in your xcconfig files isn&apos;t emulated either: http://crbug.com/122592 We ended up using gyp conditionals instead, so we didn&apos;t end up implementing this either.

If you only care about producing xcode files , this is a non-issue for you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>832349</commentid>
    <comment_count>11</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2013-02-13 14:33:51 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (From update of attachment 187227 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=187227&amp;action=review
&gt; 
&gt; &gt; Source/WTF/WTF.gyp/mac/WTF.gyp:7
&gt; &gt; +      &apos;xcode_config_file&apos;: &apos;&lt;(project_dir)/Configurations/Base.xcconfig&apos;,
&gt; 
&gt; Just FYI: xcode_config_file works for the xcode backend of gyp, but there&apos;s no support for it in the make and ninja generators. There&apos;s http://crbug.com/90043 open for adding support, but we ended up not needing it for chromium, so we didn&apos;t implement that.
&gt; 
&gt; Just copying the contents of the xcconfig into an xcode_settings block doesn&apos;t quite work either, because the conditional syntax used in your xcconfig files isn&apos;t emulated either: http://crbug.com/122592 We ended up using gyp conditionals instead, so we didn&apos;t end up implementing this either.
&gt; 
&gt; If you only care about producing xcode files , this is a non-issue for you.

Understood. I&apos;m initially trying to match the structure of our existing Xcode projects. Once we get that working, we can evolve towards a less Xcode-specific gyp file.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>187227</attachid>
            <date>2013-02-07 20:34:51 -0800</date>
            <delta_ts>2013-02-13 14:26:08 -0800</delta_ts>
            <desc>WTF.gyp for Mac</desc>
            <filename>WTF-gyp.patch</filename>
            <type>text/plain</type>
            <size>2938</size>
            <attacher name="Mark Rowe (bdash)">mrowe</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XVEYvV1RGLmd5cC9tYWMvV1RGLmd5cCBiL1NvdXJjZS9XVEYv
V1RGLmd5cC9tYWMvV1RGLmd5cApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi42
ZjM2MmUxCi0tLSAvZGV2L251bGwKKysrIGIvU291cmNlL1dURi9XVEYuZ3lwL21hYy9XVEYuZ3lw
CkBAI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gfQorICB9LAorICAndGFyZ2V0cyc6IFsK
KyAgICB7CisgICAgICAndGFyZ2V0X25hbWUnOiAnV1RGJywKKyAgICAgICd0eXBlJzogJ3N0YXRp
Y19saWJyYXJ5JywKKyAgICAgICd4Y29kZV9jb25maWdfZmlsZSc6ICc8KHByb2plY3RfZGlyKS9D
b25maWd1cmF0aW9ucy9XVEYueGNjb25maWcnLAorICAgICAgJ2RlcGVuZGVuY2llcyc6IFsnQ29w
eSBXVEYgSGVhZGVycyddLAorICAgICAgJ3NvdXJjZXMnOiBbCisgICAgICAgICcuLi8uLi9jb25m
aWcuaCcsCisgICAgICAgICc8QCh3dGZfcHJpdmF0ZWhlYWRlcl9maWxlcyknLAorICAgICAgICAn
PEAod3RmX2ZpbGVzKScsCisgICAgICBdLAorICAgICAgJ3NvdXJjZXMvJzogWworICAgICAgICBb
J2V4Y2x1ZGUnLCAnd3RmL2Nocm9taXVtJ10sCisgICAgICAgIFsnZXhjbHVkZScsICd3dGYvZWZs
J10sCisgICAgICAgIFsnZXhjbHVkZScsICd3dGYvZ3RrJ10sCisgICAgICAgIFsnZXhjbHVkZScs
ICd3dGYvcXQnXSwKKyAgICAgICAgWydleGNsdWRlJywgJ3d0Zi91bmljb2RlL3F0NCddLAorICAg
ICAgICBbJ2V4Y2x1ZGUnLCAnd3RmL3VuaWNvZGUvd2NoYXInXSwKKyAgICAgICAgWydleGNsdWRl
JywgJ3d0Zi91cmwnXSwKKyAgICAgICAgWydleGNsdWRlJywgJ3d0Zi93aW5jZSddLAorICAgICAg
ICBbJ2V4Y2x1ZGUnLCAnd3RmL3d4J10sCisgICAgICAgIFsnZXhjbHVkZScsICcoRGVmYXVsdHxX
Y2hhcnxHdGt8Tm9uZXxRdHxXaW58V3h8RWZsKVxcLihjcHB8bW0pJCddLAorICAgICAgXSwKKyAg
ICB9LAorICAgIHsKKyAgICAgICd0YXJnZXRfbmFtZSc6ICdDb3B5IFdURiBIZWFkZXJzJywKKyAg
ICAgICd0eXBlJzog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