This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Windows/Linux CMake builders for Hexagon using common getClangCMakeBuildFactory
AbandonedPublic

Authored by rfoos on Jan 7 2015, 8:44 AM.

Details

Summary

This depends on updates to getClangCMakeBuildFactory.

The builder definitions are examples of Linux and Windows(MSVC) builds using a single build factory.

Diff Detail

Repository
rL LLVM

Event Timeline

rfoos updated this revision to Diff 17862.Jan 7 2015, 8:44 AM
rfoos retitled this revision from to Windows/Linux CMake builders for Hexagon using common getClangCMakeBuildFactory.
rfoos updated this object.
rfoos edited the test plan for this revision. (Show Details)
rfoos set the repository for this revision to rL LLVM.
rfoos added a project: Restricted Project.
rfoos added a subscriber: Unknown Object (MLST).
rfoos retitled this revision from Windows/Linux CMake builders for Hexagon using common getClangCMakeBuildFactory to [zorg] Windows/Linux CMake builders for Hexagon using common getClangCMakeBuildFactory.Jan 7 2015, 9:22 AM
rengolin added inline comments.Jan 9 2015, 9:20 AM
buildbot/osuosl/master/config/builders.py
401

Will we have to add this to the current builders, too?

rfoos added inline comments.Jan 9 2015, 10:09 AM
buildbot/osuosl/master/config/builders.py
401

Yes the builder definition for a non-ninja build must pass everything in the command line.

This looks more difficult on the surface, but in fact it removes all the special case code from the builder. It is a much simpler way when you look at adding code to cover both windows and linux builds.

The default is correctly formed ninja that works on Linux. This goes with the original intent of the builder.

To use make or MSBuild or anything else the whole cmd line for each step is passed.

This eliminates the complexity of the MSVC factories.

The msbuild factories hardcoded or passed by argument the additional information for configuration (i.e. RelWithDebInfo), compiler version, environment, and targets/project files. (i.e. MSBuild doesn't use targets but rather named project files)

There's no real smart way to map "ninja install" to "MSBuild INSTALL.vcxproj" and many of the others.

Specifying everything in the command line arguments simplified everything.

  • additional planned change

I will add jobs and loadaverage to the command line arguments too. These are supposed to be passed as properties defined by the buildslave. The current code has to change anyway.

The reason to move jobs/loadaverage out to the command line arguments are special -j/-l cases for make/ninja, lit, MSBuild, and Windows (warnings on loadaverage).

The logic for jobs/loadaverage brings back special case code, so it will move to the arguments, and the relevant commands will be loaded wrapped in WithProperties/Interpolate to allow any property to be used.

gkistanova added inline comments.Jan 9 2015, 12:03 PM
buildbot/osuosl/master/config/builders.py
401

The params seem generic enough and the same for all the similar VS builders.
How about defining them once for all the similar builders?

rfoos added inline comments.Jan 9 2015, 1:46 PM
buildbot/osuosl/master/config/builders.py
401

I'm thinking you mean a wrapper builder that takes an existing VS builder and translates the arguments into a call to the generic cmake builder?

If so Yes!

After the current one is used by a few others, and is running production for 2 days.

There are bound to be a few changes when others start using this, and waiting a short period would make testing a lot easier.

Wrapper builders that demonstrate some more complicated command lines would make it both easy to use, and serve as documentation for some more complicated use cases.

gkistanova added inline comments.Jan 9 2015, 3:11 PM
buildbot/osuosl/master/config/builders.py
401

Yes, I was thinking of a wrapper builder.
And of course this is something which could wait till later.

The only potential challenge for wrapper builders I see is to make sure they will reload safely and correctly during the reconfig.

rengolin edited edge metadata.Mar 10 2015, 4:44 AM

Any progress in this? If not, can we close this review?

rfoos abandoned this revision.Apr 10 2015, 9:09 AM

Superseded by D6866