This is an archive of the discontinued LLVM Phabricator instance.

Support multi-configuration generators correctly in several config files
ClosedPublic

Authored by stella.stamenova on Feb 10 2021, 9:14 AM.

Details

Summary

Multi-configuration generators (such as Visual Studio and Xcode) allow the specification of a build flavor at build time instead of config time, so the lit configuration files need to support that - and they do for the most part. There are several places that had one of two issues (or both!):

  1. Paths had %(build_mode)s set up, but then not configured, resulting in values that would not work correctly e.g. D:/llvm-build/%(build_mode)s/bin/dsymutil.exe
  2. Paths did not have %(build_mode)s set up, but instead contained $(Configuration) (which is the value for Visual Studio at configuration time, for Xcode they would have had the equivalent) e.g. "D:/llvm-build/$(Configuration)/lib".

This seems to indicate that we still have a lot of fragility in the configurations, but also that a number of these paths are never used (at least on Windows) since the errors appear to have been there a while.

This patch fixes the configurations and it has been tested with Ninja and Visual Studio to generate the correct paths. We should consider removing some of these settings altogether.

Diff Detail

Event Timeline

stella.stamenova requested review of this revision.Feb 10 2021, 9:14 AM
Herald added projects: Restricted Project, Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptFeb 10 2021, 9:14 AM
mehdi_amini accepted this revision.Feb 10 2021, 1:45 PM
This revision is now accepted and ready to land.Feb 10 2021, 1:45 PM
JDevlieghere accepted this revision.Feb 10 2021, 1:54 PM

LGTM. I'm surprised the dsymutil one slipped through the cracks, we have a bot that should (?) be testing this configuration: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/

stella.stamenova edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Feb 11 2021, 9:32 AM
This revision was automatically updated to reflect the committed changes.

LGTM. I'm surprised the dsymutil one slipped through the cracks, we have a bot that should (?) be testing this configuration: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/

Maybe it used the system dsymutil or something? (or maybe it worked by accident in the Xcode setup)

Anyway, I wonder if we could have some (low frequency) bot that could test this configuration? There is the LLDB+Xcode one and I have my own standalone build bot, but I guess we would need a Visual studio one too?