question about llvm+build on M1 apple computer

43 views
Skip to first unread message

Jiang Wei

unread,
May 24, 2021, 4:10:00 AM5/24/21
to cl...@chromium.org
Hi there,

We have vpython incompatible issue, so we always failed to run “gclient runhooks” on M1 computers.

But our codebase should continue to work.

Is there any chance to directly download the llv+build for iOS/macOS?

We need that directly to get around python issues, so we can continue make our build compilable on M1 computers.

Thank you.

Nico Weber

unread,
May 24, 2021, 9:08:59 AM5/24/21
to Jiang Wei, Clang maintainers
Hi,

this should work without problems on latest main -- are you all synced up? There's documentation here: https://chromium.googlesource.com/chromium/src/+/main/docs/mac_arm64.md#building-on-arm-macs

If you're on an older commit, you can look through the history of that file to see older workarounds, e.g. the LHS here: https://source.chromium.org/chromium/chromium/src/+/f169d9614430c07527bf43af59f6883350151447:docs/mac_arm64.md;dlc=d0f42ae87600d1d1d97742a3bdd634119a06b1e2 In particular, running

    export VPYTHON_BYPASS="manually managed python not supported by chrome operations"

might work. But building on arm macs started working very recently, so if you're on an older branch cross-compiling might work better for you. That's what we still do on all Google Chrome bots for now, so it's the codepath most likely to be working.

Hope this helps,
Nico

--
To unsubscribe from this group and stop receiving emails from it, send an email to clang+un...@chromium.org.

Jiang Wei

unread,
May 24, 2021, 9:14:47 PM5/24/21
to Nico Weber, Clang maintainers
We are using M72 codebase, so here is the problem I met:


We are still using llvm-build in src/third-party tool, which it contains a bunch of clang commands.
After upgrade to Xcode 12.5 + M1 computer won’t compile because of a lot include/v1/c++ header issue, like can’t find strncat, a lot foundation compile errors.

So I checkout latest command according to your guide, it works fine in iOS compilation.
However it fails when compile Mac version.

Because the *.gn use a lot plugin like “findBadConstructors”, etc, I just can’t find correct llvm-build in your latest folder.
It clearly removed the plugin, but It’s really hard to upgrade our codebase M72 to your latest.

Any way to make our M72 compilation work in latest M1 computers?

Thank you

Jacob

K. Moon

unread,
May 24, 2021, 9:52:40 PM5/24/21
to Jiang Wei, Nico Weber, Clang maintainers
The first version of Chrome to be released with native M1 support was M87, so I doubt this is going to be possible without a lot of work.

Nico Weber

unread,
May 25, 2021, 10:20:53 AM5/25/21
to K. Moon, Jiang Wei, Clang maintainers
Yes, getting Chromium to run on arm chips without rosetta needed quite a few changes to the codebase. Anything before M87 won't run without rosetta.

If you're trying to cross-built intel chromium on an arm device, I don't think that's something anyone's tried yet.

It sounds like you're maybe trying to compile chromium with xcode's clang (?). If so, that will likely won't work very well either, but you can set `clang_use_chrome_plugins=false` in your args.gn to disable the plugin flags.
Reply all
Reply to author
Forward
0 new messages