Closed Bug 1067893 Opened 10 years ago Closed 9 years ago

Detect OTOOL in configure and use it for all 'otool' calls

Categories

(Firefox Build System :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36

People

(Reporter: gk, Assigned: gk)

References

Details

Attachments

(1 file, 1 obsolete file)

Similar to how STRIP, RANLIB etc. work we should detect OTOOL in configure and use its value instead of 'otool'.
OS: Windows 7 → Mac OS X
Hardware: x86 → All
I adapted the otool calls in a all python files. Try is green for Linux/OS X/Windows https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=7c1341f44a00 and Tor Browser is building as well with the patch. Not sure what to do with the remaining unchanged otool calls. Any opinions?
Attachment #8526760 - Flags: review?(mh+mozilla)
Comment on attachment 8526760 [details] [diff] [review]
Detect OTOOL in configure - 1067893.patch

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

::: media/webrtc/trunk/tools/gyp/test/mac/gyptest-installname.py
@@ +13,5 @@
>  
>  import re
>  import subprocess
>  import sys
> +from buildconfig import substs

Please don't touch the files under media/webrtc/trunk/tools/gyp/test, they're third-party and not used.

::: tools/rb/fix_macosx_stack.py
@@ +49,5 @@
>  address_adjustments = {}
>  def address_adjustment(file):
>      if not file in address_adjustments:
>          result = None
> +        otool = subprocess.Popen([substs['OTOOL'], "-l", file], stdout=subprocess.PIPE)

This doesn't usually run in a build environment, so using substs here won't work. That said, since it's not used during the build, let's leave it as it is for now.
Attachment #8526760 - Flags: review?(mh+mozilla) → feedback-
Thanks for the comments. I addressed them and attached an updated patch.
Assignee: nobody → gk
Attachment #8526760 - Attachment is obsolete: true
Attachment #8528332 - Flags: review?(mh+mozilla)
Attachment #8528332 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9f67efecf1b4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Depends on: 1105723
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.