Closed Bug 1257689 Opened 9 years ago Closed 9 years ago

Move YASM check to moz.configure

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: ted, Assigned: ted)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I need the YASM check in js/src for my ICU work so I might as well move it to moz.configure while I'm at it.
https://reviewboard.mozilla.org/r/40931/#review37471 little drive-by ::: moz.configure:149 (Diff revision 1) > + }.get((target.kernel, target.cpu), None) > + if asflags is None: > + # We're assuming every x86 platform we support that's > + # not Windows or Mac is ELF. > + if target.cpu == 'x86': > + asflags = '-f elf32 -rnasm -pnasm' lists would be better.
Comment on attachment 8731915 [details] MozReview Request: bug 1257689 - move YASM check to moz.configure. r?mshal Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40931/diff/1-2/
https://reviewboard.mozilla.org/r/40931/#review37497 ::: moz.configure:144 (Diff revision 2) > + ('OSX', 'x86'): '-f macho32 -rnasm -pnasm', > + ('OSX', 'x86_64'): '-f macho64 -rnasm -pnasm', > + ('WINNT', 'x86'): '-f win32 -rnasm -pnasm', > + ('WINNT', 'x86_64'): '-f x64 -rnasm -pnasm', > + > + }.get((target.kernel, target.cpu), None) you want target.os, not target.kernel ::: moz.configure:149 (Diff revision 2) > + }.get((target.kernel, target.cpu), None) > + if asflags is None: > + # We're assuming every x86 platform we support that's > + # not Windows or Mac is ELF. > + if target.cpu == 'x86': > + asflags = '-f elf32 -rnasm -pnasm' again, lists would be better: ['-f', 'elf32', '-rnasm', '-pnasm']
https://reviewboard.mozilla.org/r/40931/#review37497 > again, lists would be better: ['-f', 'elf32', '-rnasm', '-pnasm'] This doesn't work with a list currently, I filed bug 1257808 on that. I'm going to land it with strings and we can change it if we fix that.
Comment on attachment 8731915 [details] MozReview Request: bug 1257689 - move YASM check to moz.configure. r?mshal Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40931/diff/2-3/
Comment on attachment 8731915 [details] MozReview Request: bug 1257689 - move YASM check to moz.configure. r?mshal https://reviewboard.mozilla.org/r/40931/#review37649 ::: moz.configure:120 (Diff revision 3) > +# ============================================================== > +yasm = check_prog('YASM', ['yasm'], allow_missing=True) > + > +@depends(yasm) > +@checking('yasm version') > +@advanced The @advanced line might be bit-rotted by bug 1256573. Just a heads up. ::: moz.configure:128 (Diff revision 3) > + import subprocess > + try: > + version = Version(subprocess.check_output( > + [yasm, '--version'] > + ).splitlines()[0].split()[1]) > + # Until we move all the yasm consumers out of old-configure. Is there a bug on file for this? Might be good to reference it here. ::: moz.configure:152 (Diff revision 3) > + if target.cpu == 'x86': > + asflags = '-f elf32 -rnasm -pnasm' > + elif target.cpu == 'x86_64': > + asflags = '-f elf64 -rnasm -pnasm' > + if asflags: > + set_config('YASM_ASFLAGS', asflags) You could just append '-rnasm -pnasm' to the flags here before set_config(), rather than specify them for each arch.
Attachment #8731915 - Flags: review?(mshal) → review+
Blocks: 1257904
https://reviewboard.mozilla.org/r/40931/#review37649 > The @advanced line might be bit-rotted by bug 1256573. Just a heads up. Thanks, although since glandium doesn't have a patch there yet I think I'll be OK. :) > Is there a bug on file for this? Might be good to reference it here. Filed bug 1257904.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Blocks: 1259275
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: