Bug 177640

Summary: JSC generate unified sources doesn't need to run during installhdrs.
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, mark.lam, mitz, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=179578
Attachments:
Description Flags
Patch
none
Patch none

Description Keith Miller 2017-09-28 20:48:58 PDT
JSC generate unified sources doesn't need to run during installhdrs.
Comment 1 Keith Miller 2017-09-28 20:53:00 PDT
Created attachment 322163 [details]
Patch
Comment 2 mitz 2017-09-28 20:59:07 PDT
Comment on attachment 322163 [details]
Patch

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

> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10307
> +				INFOPLIST_FILE = "Generate Unified Sources-Info.plist";

LOL. This build setting is a path to a file in the source tree. I don’t think there’s a file with either name. But it doesn't matter, because this build setting is meaningless for a target that doesn't build a bundle or a binary with an embedded Info.plist.

> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10338
> +				INSTALLHDRS_SCRIPT_PHASE = NO;

This quadruplication is one of the reasons why we don’t define build settings in the .pbxproj file, but rather in .xcconfig files. You may be able to get away with simply changing the Generate Unified Sources target’s configuration file to “None” in the project editor, because the default for INSTALLHDRS_SCRIPT_PHASE is NO. If that doesn’t work, you’ll need to create a new .xcconfig file for this target and add any required settings to it.
Comment 3 Keith Miller 2017-09-28 21:34:24 PDT
Comment on attachment 322163 [details]
Patch

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

>> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10307
>> +				INFOPLIST_FILE = "Generate Unified Sources-Info.plist";
> 
> LOL. This build setting is a path to a file in the source tree. I don’t think there’s a file with either name. But it doesn't matter, because this build setting is meaningless for a target that doesn't build a bundle or a binary with an embedded Info.plist.

OHH, I didn't realize that this list of settings was just custom values. Yeah there none of the settings here are needed. TBH, it shouldn't even be different regardless of the build "configuration".

>> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10338
>> +				INSTALLHDRS_SCRIPT_PHASE = NO;
> 
> This quadruplication is one of the reasons why we don’t define build settings in the .pbxproj file, but rather in .xcconfig files. You may be able to get away with simply changing the Generate Unified Sources target’s configuration file to “None” in the project editor, because the default for INSTALLHDRS_SCRIPT_PHASE is NO. If that doesn’t work, you’ll need to create a new .xcconfig file for this target and add any required settings to it.

Yeah, setting it to None seems to have worked. I also got rid of the INFOPLIST_FILE setting. For whatever reason you can't get rid of the PRODUCT_NAME setting. I don't fully understand the implications of its existence but w/e. For JSC it doesn't matter since we don't care about the FEATURE_DEFINES value in the JavaScriptCore.xcconfig but in WebCore the unified source bundler script will. It doesn't really seem worth it to redefine all the values in the xcconfig file just so that we can save 4 lines here but idk how to Xcode.
Comment 4 mitz 2017-09-28 21:38:59 PDT
(In reply to Keith Miller from comment #3)
> Comment on attachment 322163 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=322163&action=review
> 
> >> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10307
> >> +				INFOPLIST_FILE = "Generate Unified Sources-Info.plist";
> > 
> > LOL. This build setting is a path to a file in the source tree. I don’t think there’s a file with either name. But it doesn't matter, because this build setting is meaningless for a target that doesn't build a bundle or a binary with an embedded Info.plist.
> 
> OHH, I didn't realize that this list of settings was just custom values.
> Yeah there none of the settings here are needed. TBH, it shouldn't even be
> different regardless of the build "configuration".
> 
> >> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:10338
> >> +				INSTALLHDRS_SCRIPT_PHASE = NO;
> > 
> > This quadruplication is one of the reasons why we don’t define build settings in the .pbxproj file, but rather in .xcconfig files. You may be able to get away with simply changing the Generate Unified Sources target’s configuration file to “None” in the project editor, because the default for INSTALLHDRS_SCRIPT_PHASE is NO. If that doesn’t work, you’ll need to create a new .xcconfig file for this target and add any required settings to it.
> 
> Yeah, setting it to None seems to have worked. I also got rid of the
> INFOPLIST_FILE setting. For whatever reason you can't get rid of the
> PRODUCT_NAME setting. I don't fully understand the implications of its
> existence but w/e. For JSC it doesn't matter since we don't care about the
> FEATURE_DEFINES value in the JavaScriptCore.xcconfig but in WebCore the
> unified source bundler script will. It doesn't really seem worth it to
> redefine all the values in the xcconfig file just so that we can save 4
> lines here but idk how to Xcode.

You won’t need to “redefine all the values” in any case, because you can use #include and because within the same level in the build setting hierarchy, the last definition of any build setting prevails.
Comment 5 Keith Miller 2017-09-28 21:45:00 PDT
Created attachment 322167 [details]
Patch
Comment 6 Keith Miller 2017-09-28 21:46:02 PDT
(In reply to mitz from comment #4)
>
> You won’t need to “redefine all the values” in any case, because you can use
> #include and because within the same level in the build setting hierarchy,
> the last definition of any build setting prevails.

Ah, good point.
Comment 7 mitz 2017-10-05 19:32:56 PDT
Would be good to land the patch soon, as it resolves some problems in Apple’s internal build system.
Comment 8 mitz 2017-10-05 19:33:30 PDT
(In reply to mitz from comment #7)
> Would be good to land the patch soon, as it resolves some problems in
> Apple’s internal build system.

Never mind, I overlooked the commit-queue flag.
Comment 9 WebKit Commit Bot 2017-10-05 20:02:00 PDT
Comment on attachment 322167 [details]
Patch

Clearing flags on attachment: 322167

Committed r222954: <http://trac.webkit.org/changeset/222954>
Comment 10 WebKit Commit Bot 2017-10-05 20:02:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2017-10-05 20:03:30 PDT
<rdar://problem/34849704>