|
|
Created:
8 years ago by tony Modified:
8 years ago CC:
chromium-reviews, Dirk Pranke, cmp+cc_chromium.org, M-A Ruel, scottmg Visibility:
Public. |
DescriptionAdd Linux 32-bit versions of Ninja
I compiled this on the WebKit Linux 32 bot and verified that it runs.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172191
Patch Set 1 #
Total comments: 2
Patch Set 2 : #
Total comments: 1
Patch Set 3 : #
Total comments: 4
Patch Set 4 : #Messages
Total messages: 17 (0 generated)
I plan on switching the Linux builders on chromium.webkit to use ninja, but we need a 32 bit ninja for Linux 32. This means that running depot_tools/ninja will have to run uname each time, but it seems fast (strace uname -a is pretty minimal).
Tony, please do not put that many reviewers. Deferring to Stefan for bash-fu. Nico/Scott for ninja. I didn't know we had a 32 bits build or supported it at all.
On 2012/12/10 19:55:55, Marc-Antoine Ruel wrote: > Tony, please do not put that many reviewers. > > Deferring to Stefan for bash-fu. > > Nico/Scott for ninja. I didn't know we had a 32 bits build or supported it at > all. +1 for not supporting this. https://codereview.chromium.org/11485007/ adds self-service notes.
We discussed this on IRC; adding this binary lgtm. I'll ping Tony if I need new binaries. One comment below though, and one question here: Is this built from the v1.0.0 tag? Does `ninja --version` with this binary say "1.0.0"? (IRC transcript: tony^work: thakis_: why don't we want to support 32 bit ninja? [12:09pm] thakis: tony^work: mostly because it's needed by 2 people and it makes updating ninja more work [12:10pm] tony^work: thakis: I'm doing it for the bot. [12:10pm] thakis: tony^work: is it hard to set up a chroot to build 32bit targets with 64 bit tools? [12:10pm] tony^work: making the bot not use ninja will be more pain [12:10pm] ilevy_ joined the chat room. [12:10pm] ilevy_ was granted voice by ChanServ. [12:10pm] thakis: tony^work: i mean could the bot be 64 bit and built 32 bit? [12:10pm] tony^work: thakis: build/install-chroot.sh should work [12:11pm] thakis: s/built/build/ [12:11pm] tony^work: thakis: in the past, the infrastructure team didn't want to use a chroot if we can avoid it [12:11pm] thakis: oh? ok then i guess [12:11pm] tony^work: it's easier for the bot to be a 32 bit vm [12:11pm] bisquick left the chat room. (Read error: Connection reset by peer) [12:11pm] thakis: that's surprising, i would've thought they'd prefer fewer build environments [12:12pm] tony^work: thakis: it makes install new packages harder since you have to ssh to the bot and then change into the chroot [12:12pm] ppr left the chat room. (Ping timeout: 265 seconds) [12:12pm] tony^work: or run a separate ssh on the bot in the chroot [12:12pm] tony^work: but then you have port issues [12:12pm] thakis: ok ) https://codereview.chromium.org/11511007/diff/1/ninja File ninja (right): https://codereview.chromium.org/11511007/diff/1/ninja#newcode11 ninja:11: if [ -n "`uname -a | grep x86_64`" ]; then Does this work with a 64bit kernel and 32bit userland? The gold script did something like this first I think and switched to checking machine id instead: http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/gold/ld?view=log
On Mon, Dec 10, 2012 at 12:15 PM, <thakis@chromium.org> wrote: > We discussed this on IRC; adding this binary lgtm. I'll ping Tony if I need > new > binaries. > > One comment below though, and one question here: > > Is this built from the v1.0.0 tag? Does `ninja --version` with this binary > say > "1.0.0"? (If you haven't, follow the commands in http://src.chromium.org/viewvc/chrome/trunk/tools/depot_tools/ninja-mac?view=log -- also run tests and strip) > > (IRC transcript: > > tony^work: thakis_: why don't we want to support 32 bit ninja? > [12:09pm] thakis: tony^work: mostly because it's needed by 2 people and it > makes > updating ninja more work > [12:10pm] tony^work: thakis: I'm doing it for the bot. > [12:10pm] thakis: tony^work: is it hard to set up a chroot to build 32bit > targets with 64 bit tools? > [12:10pm] tony^work: making the bot not use ninja will be more pain > [12:10pm] ilevy_ joined the chat room. > [12:10pm] ilevy_ was granted voice by ChanServ. > [12:10pm] thakis: tony^work: i mean could the bot be 64 bit and built 32 > bit? > [12:10pm] tony^work: thakis: build/install-chroot.sh should work > [12:11pm] thakis: s/built/build/ > [12:11pm] tony^work: thakis: in the past, the infrastructure team didn't > want to > use a chroot if we can avoid it > [12:11pm] thakis: oh? ok then i guess > [12:11pm] tony^work: it's easier for the bot to be a 32 bit vm > [12:11pm] bisquick left the chat room. (Read error: Connection reset by > peer) > [12:11pm] thakis: that's surprising, i would've thought they'd prefer fewer > build environments > [12:12pm] tony^work: thakis: it makes install new packages harder since you > have > to ssh to the bot and then change into the chroot > [12:12pm] ppr left the chat room. (Ping timeout: 265 seconds) > [12:12pm] tony^work: or run a separate ssh on the bot in the chroot > [12:12pm] tony^work: but then you have port issues > [12:12pm] thakis: ok > ) > > > https://codereview.chromium.org/11511007/diff/1/ninja > File ninja (right): > > https://codereview.chromium.org/11511007/diff/1/ninja#newcode11 > ninja:11: if [ -n "`uname -a | grep x86_64`" ]; then > Does this work with a 64bit kernel and 32bit userland? The gold script > did something like this first I think and switched to checking machine > id instead: > http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/gold/ld?view=log > > https://codereview.chromium.org/11511007/
https://codereview.chromium.org/11511007/diff/1/ninja File ninja (right): https://codereview.chromium.org/11511007/diff/1/ninja#newcode11 ninja:11: if [ -n "`uname -a | grep x86_64`" ]; then On 2012/12/10 20:15:29, Nico wrote: > Does this work with a 64bit kernel and 32bit userland? The gold script did > something like this first I think and switched to checking machine id instead: > http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/gold/ld?view=log Not sure I understand the desired effect here. On my 64-bit machine: $ uname -m x86_64 $ linux32 uname -m i686 $ getconf LONG_BIT 64 $ linux32 getconfig LONG_BIT 64 If you're on a 64-bit machine in 32-bit userland, don't you want to use the 32-bit version of ninja?
On Mon, Dec 10, 2012 at 12:23 PM, <szager@chromium.org> wrote: > > https://codereview.chromium.org/11511007/diff/1/ninja > File ninja (right): > > https://codereview.chromium.org/11511007/diff/1/ninja#newcode11 > ninja:11: if [ -n "`uname -a | grep x86_64`" ]; then > On 2012/12/10 20:15:29, Nico wrote: >> >> Does this work with a 64bit kernel and 32bit userland? The gold script > > did >> >> something like this first I think and switched to checking machine id > > instead: > > http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/gold/ld?view=log > > > Not sure I understand the desired effect here. On my 64-bit machine: > > $ uname -m > x86_64 > $ linux32 uname -m > i686 > $ getconf LONG_BIT > 64 > $ linux32 getconfig LONG_BIT > 64 > > If you're on a 64-bit machine in 32-bit userland, don't you want to use > the 32-bit version of ninja? I don't remember the details, but I think we tried that first with gold and something didn't work. All I remember is that it was hairy somehow. In any case we should use the same logic here and in gold, so if you don't use what we use in gold, please change gold to use what you end up doing here.
I switched to the v1.0.0 branch and ran ninja_test. All pass. I also switched to use getconf LONG_BIT. On my 32 bit chroot, it properly returns 32.
lgtm, one further optional comment below https://codereview.chromium.org/11511007/diff/1003/ninja File ninja (right): https://codereview.chromium.org/11511007/diff/1003/ninja#newcode15 ninja:15: exec "${THIS_DIR}/ninja-linux32" "$@" Should you check for = 32 in an elif and error out in the else?
On 2012/12/10 20:54:01, Nico wrote: > lgtm, one further optional comment below > > https://codereview.chromium.org/11511007/diff/1003/ninja > File ninja (right): > > https://codereview.chromium.org/11511007/diff/1003/ninja#newcode15 > ninja:15: exec "${THIS_DIR}/ninja-linux32" "$@" > Should you check for = 32 in an elif and error out in the else? Sure, could be helpful. Stefan, does this look OK to you? Marc-Antoine, can I get an owner's LG?
lgtm
+iannucci for FYI/review since he has been working on bot-ninja-ification
https://codereview.chromium.org/11511007/diff/7003/ninja File ninja (right): https://codereview.chromium.org/11511007/diff/7003/ninja#newcode12 ninja:12: if [ "$machine" = "64" ]; then Use [[ ]]'s https://codereview.chromium.org/11511007/diff/7003/ninja#newcode17 ninja:17: echo Unknown architecture-- unable to run ninja. Maybe print out what $machine is here for debugging
https://codereview.chromium.org/11511007/diff/7003/ninja File ninja (right): https://codereview.chromium.org/11511007/diff/7003/ninja#newcode12 ninja:12: if [ "$machine" = "64" ]; then On 2012/12/10 23:22:21, iannucci wrote: > Use [[ ]]'s Done. https://codereview.chromium.org/11511007/diff/7003/ninja#newcode17 ninja:17: echo Unknown architecture-- unable to run ninja. On 2012/12/10 23:22:21, iannucci wrote: > Maybe print out what $machine is here for debugging Done.
Can I get an OWNER to LGTM this?
lgtm
lgtm |