Bug 82466 - Use xcrun to find nm and ranlib on OS X builds
Summary: Use xcrun to find nm and ranlib on OS X builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks: 80915
  Show dependency treegraph
 
Reported: 2012-03-28 07:19 PDT by David Kilzer (:ddkilzer)
Modified: 2012-03-28 13:14 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.05 KB, patch)
2012-03-28 07:40 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch (4.35 KB, patch)
2012-03-28 10:37 PDT, David Kilzer (:ddkilzer)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2012-03-28 07:19:10 PDT
When running build-webkit, we should use xcrun to find the nm(1) and ranlib(1) commands on OS X.
Comment 1 David Kilzer (:ddkilzer) 2012-03-28 07:40:36 PDT
Created attachment 134292 [details]
Patch
Comment 2 mitz 2012-03-28 10:14:32 PDT
Comment on attachment 134292 [details]
Patch

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

> Tools/Scripts/webkitperl/features.pm:57
> +sub nmPath()
> +{
> +    if (isAppleMacWebKit()) {
> +        my $nm = `xcrun -find nm`;
> +        chomp $nm;
> +        return $nm if $nm;
> +    }
> +    return "nm";
> +}

Should this function cache the result? Probably doesn’t matter if we run nm only on libraries, but could matter if we run it on every new .o file.
Comment 3 David Kilzer (:ddkilzer) 2012-03-28 10:37:58 PDT
Created attachment 134330 [details]
Patch
Comment 4 David Kilzer (:ddkilzer) 2012-03-28 10:39:22 PDT
(In reply to comment #3)
> Created an attachment (id=134330) [details]
> Patch

ChangeLog:
- Moved nmPath() to webkitdirs.pm so check-for-global-initializers could use it later.
- Cache result of nmPath().
- Moved $ranlib out of the foreach loop in build-webkit.
Comment 5 mitz 2012-03-28 10:51:31 PDT
Comment on attachment 134330 [details]
Patch

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

> Tools/Scripts/webkitdirs.pm:1312
> +sub determineNMPath()

I don’t know why the M is uppercase :-)
Comment 6 David Kilzer (:ddkilzer) 2012-03-28 13:03:34 PDT
(In reply to comment #5)
> (From update of attachment 134330 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=134330&action=review
> 
> > Tools/Scripts/webkitdirs.pm:1312
> > +sub determineNMPath()
> 
> I don’t know why the M is uppercase :-)

My Shift key was stuck?!  :)  Fixed.
Comment 7 David Kilzer (:ddkilzer) 2012-03-28 13:14:25 PDT
Committed r112431: <http://trac.webkit.org/changeset/112431>