This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Build and test LLVM with GN
ClosedPublic

Authored by vitalybuka on May 16 2019, 11:31 AM.

Event Timeline

vitalybuka created this revision.May 16 2019, 11:31 AM

remove unused depot_tools

thakis accepted this revision.May 16 2019, 11:56 AM

Cool!

Having a bot for this is great, under these conditions:

  • It doesn't send email to regular contributors when it goes red (it can email you and me and others who'd like to opt in)
  • It doesn't show up on http://lab.llvm.org:8011/console

Basically, it needs to be consistent with the 1st paragraph at https://github.com/llvm/llvm-project/blob/master/llvm/utils/gn/README.rst

From what I understand, this doesn't add a bot yet, so lgtm.

zorg/buildbot/builders/sanitizers/buildbot_gn.sh
30

What's the motivation for doing a stage 1 build with cmake first? (Not saying it's wrong and you can keep it if you want, just trying to understand the motivation.)

If you just want some clang binary as host compiler, you could alternatively git clone https://chromium.googlesource.com/chromium/src/tools/clang and then run update.py -- this will download a prebuilt clang and lld, and will be much faster than building it from scratch.

If you want to test bootstrap builds, I think there's a way to hold the GN build so that it does a bootstrap build in a single build dir.

39

Does the binary downloaded by llvm/utils/gn/get.py not work on this bot?

56

You don't need to pass use_lld=true is_optimized=true is_debug=false -- use_lld defaults to true if clang_base_path is set, and optimized release builds (with asserts) is the default .

This revision is now accepted and ready to land.May 16 2019, 11:56 AM

Cool!

Having a bot for this is great, under these conditions:

  • It doesn't send email to regular contributors when it goes red (it can email you and me and others who'd like to opt in)

already done in D61965, but you need to opt-in. I can do it for you if you don'e have zorg checkout.

not done yet, as-is it will probably will show in sanitizers section. I'll check how to avoid that.

Basically, it needs to be consistent with the 1st paragraph at https://github.com/llvm/llvm-project/blob/master/llvm/utils/gn/README.rst

From what I understand, this doesn't add a bot yet, so lgtm.

Empty bot is added in D61965 but it will show up only after master restart. My plan is to land this patch only after empty one is alive, as .sh scripts do not need master restart and will be used by bots immediately.

vitalybuka marked 3 inline comments as done.

Don't hardcode default GN options

zorg/buildbot/builders/sanitizers/buildbot_gn.sh
30

That's for historical reasons. We need working clang on the host which is newer than provided by distro. Also current setup let us quickly switch to the just commited into upstream fix or feature if needed. But I don't remember we used that.

So we have other bots which use the same build_stage1_clang_at_revison functions, which is on cmake and we even can switch to GN, but it does not realy matter. We just need some fresh clang. build_stage1_clang_at_revison use fixed revision which we update manually couple times a year.

We can switch to prebuilt binaries e.g. from chrome, but this build happens only once per bot restart which is usually just a couple times a day. So at average it does not bother us yet.

But we open to switching to prebuild clang.

39

It does not. depo_tools version does not work as well.
I have not figured out how to get previous build, so decided to compile it.
Also probably we don't want "latest" GN to avoid regressions like this. On buildbot will will be hard to distinguish from LLVM issues.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 3:20 PM