This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Deduplicate setting parameters for clangcl test configs. NFC.
ClosedPublic

Authored by mstorsjo on Jul 28 2023, 2:17 PM.

Details

Summary

This patch is written on top of D155561 and D155562, but it can be
rebased and applied first, with the other two coming in on top of
this as well.

I'm undecided about whether this is a good thing or not. The duplicated
logic is clearly not great. But this on the other hand includes a lot
of very obscure variable setting that only makes sense in the context
of the *-clangcl.cfg.in files.

Diff Detail

Event Timeline

mstorsjo created this revision.Jul 28 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 2:17 PM
mstorsjo requested review of this revision.Jul 28 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 2:17 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript

Can you rebase to see whether that fixes the CI. There seems to be an issue in the modular build, which I expect is unrelated.

Can you rebase to see whether that fixes the CI. There seems to be an issue in the modular build, which I expect is unrelated.

Ok, will do - I’ll probably have to rebase the two dependencies to get the right result.

Mordante accepted this revision.Jul 30 2023, 4:15 AM

No objections from my perspective. Please wait for @andrewng's approval before landing.

This revision is now accepted and ready to land.Jul 30 2023, 4:15 AM

No objections from my perspective. Please wait for @andrewng's approval before landing.

Any preference on landing (and adapting) this to go in before the two dependencies (D155561 and D155562), or keeping it where it is now afterwards? I can adapt it so this goes in first too. The second one of those dependencies isn’t approved yet (and depends on the requirement being raised to clang 16, which I guess we can do now that the branch is made - but holding off of that for a while might ease backporting).

andrewng accepted this revision.Jul 31 2023, 8:15 AM

LGTM and is definitely an improvement. However, there's still quite a bit of duplicated content. Perhaps the templates could be merged and the other differences put into variables? Although that can be a separate patch.

Any preference on landing (and adapting) this to go in before the two dependencies (D155561 and D155562), or keeping it where it is now afterwards? I can adapt it so this goes in first too. The second one of those dependencies isn’t approved yet (and depends on the requirement being raised to clang 16, which I guess we can do now that the branch is made - but holding off of that for a while might ease backporting).

I think it would be nice to get this in before D155562, just to avoid the duplication within the patch itself. But I don't think it's a requirement.

By the way, thanks for breaking up my patch and getting most of it submitted. I wouldn't have been able to find the time to do it for quite a while!

LGTM and is definitely an improvement. However, there's still quite a bit of duplicated content. Perhaps the templates could be merged and the other differences put into variables? Although that can be a separate patch.

Yep, there is, but most of that is kinda static content (and doesn't interact with the cmake configuration options like this). OTOH I guess it could be possible to merge them into one and have most of the logic be controlled by cmake variables, but that's kinda bending the design of the current config file based test setup, so I'd prefer not to wander into that right now, but keeping the scope limited.

Any preference on landing (and adapting) this to go in before the two dependencies (D155561 and D155562), or keeping it where it is now afterwards? I can adapt it so this goes in first too. The second one of those dependencies isn’t approved yet (and depends on the requirement being raised to clang 16, which I guess we can do now that the branch is made - but holding off of that for a while might ease backporting).

I think it would be nice to get this in before D155562, just to avoid the duplication within the patch itself. But I don't think it's a requirement.

Ok, I'll rebase it that way.

By the way, thanks for breaking up my patch and getting most of it submitted. I wouldn't have been able to find the time to do it for quite a while!

No problem, I was interested in getting this fixed anyway - and it's kinda easy when having some idea of how I wanted to get it done.

mstorsjo updated this revision to Diff 546391.Aug 2 2023, 3:41 AM

Rebased to place this commit first.

mstorsjo updated this revision to Diff 546596.Aug 2 2023, 1:52 PM

Add the missed -D_DEBUG which was lost in the refactoring earlier

mstorsjo updated this revision to Diff 546706.Aug 2 2023, 11:09 PM

Rebase, hoping for a successful CI run

This revision was landed with ongoing or failed builds.Aug 4 2023, 5:55 AM
This revision was automatically updated to reflect the committed changes.