Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LLVM submodule reference #1594

Merged
merged 11 commits into from Feb 2, 2021
Merged

Conversation

CaseyCarter
Copy link
Member

... to get a test fix to support #1593.

... to get a test fix to support microsoft#1593.
@CaseyCarter CaseyCarter added the test Related to test code label Jan 28, 2021
@CaseyCarter CaseyCarter added this to Initial Review in Code Reviews via automation Jan 28, 2021
@CaseyCarter CaseyCarter moved this from Initial Review to Work In Progress in Code Reviews Jan 28, 2021
action.applyTo(config)
#lit_config.note("Applied '{}' as a result of implicitly detected feature '{}'".format(
# action.pretty(config, lit_config.params),
# feature.pretty(config)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the above changes are copied from libcxx's newconfig.py. I commented out the lit_config.note bits because I don't think we want to see this notification spam for every run, but I'm leaving the code here to make it obvious to the next person that this was in fact copied from newconfig.py.

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes so far look good.

@CaseyCarter CaseyCarter marked this pull request as ready for review January 29, 2021 18:40
@CaseyCarter CaseyCarter requested a review from a team as a code owner January 29, 2021 18:40
... to get a warning fix.
feature.enableIn(config)
lit_config.note(
"Enabling Lit feature '{}' as a result of parameter '{}'".format(feature.getName(config), param.name))
actions = param.getActions(config, lit_config.params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this getActions coming from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream. It's a method on Parameter. What used to be getFeature is now getActions, which returns a list of actions to be applied to the configuration instead of simply a feature to add.

(EDIT: fixed the hyperlink I added to actually be to Parameter.getActions instead of Feature.getActions.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ldionne can you explain what the intended purpose of this change was? I looked at the the Phabricator review but it's not immediately obvious.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change you want to look at is:

commit d085697013b447abd9a8779eddec606f48626bb9
Author: Louis Dionne <ldionne@apple.com>
Date:   Thu Oct 29 16:02:21 2020 -0400

    [libc++] Add a new concept of ConfigAction, and use it in the DSL
    
    This will allow adding bare compiler flags through the new
    configuration DSL. Previously, this would have required adding
    a Lit feature for each such flag.
    
    Differential Revision: https://reviews.llvm.org/D90429

This allows adding things like new substitutions or changing the compiler flags based on whether a command-line parameter is specified. That was previously not possible.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, that change was a pre-requisite for moving the warning flags out of the legacy config:

commit d6e2bac19554a6f877e36d09547b3686b5d7ddb1
Author: Louis Dionne <ldionne@apple.com>
Date:   Thu Oct 29 17:30:28 2020 -0400

    [libc++] Migrate warning flags to the DSL

    This makes us closer to running the test suite on platforms where the
    legacy test suite configuration doesn't work.

    One notable change after this commit is that the tests will be run with
    warnings enabled on GCC too, which wasn't the case before. However,
    previous commits should have tweaked the test suite to make sure it
    passes with warnings enabled on GCC.

    Note that warnings can still be disabled with `--param enable_warnings=False`,
    as before.

    Differential Revision: https://reviews.llvm.org/D90432

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You folks should consider storing MSVC's configuration in the LLVM monorepo. That way, we wouldn't break you arbitrarily anymore. If your config was visible to me, I'd be happy to change it and notify you when I make changes to libc++'s Lit setup.

Copy link
Contributor

@cbezault cbezault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks right though I don't understand what the advantage of moving to this "actions" on a testConfig model gains us.

@CaseyCarter CaseyCarter moved this from Work In Progress to Final Review in Code Reviews Jan 29, 2021
@StephanTLavavej StephanTLavavej moved this from Final Review to Ready To Merge in Code Reviews Jan 30, 2021
@StephanTLavavej StephanTLavavej self-assigned this Jan 31, 2021
@StephanTLavavej
Copy link
Member

@CaseyCarter @cbezault I've pushed changes to skipped_tests.txt (mirrored to expected_results.txt except for the section at the bottom) to get this to pass when mirrored to the MSVC-internal Contest test harness, which differs in how it runs tests.

Code Reviews automation moved this from Ready To Merge to Done Feb 2, 2021
@CaseyCarter CaseyCarter deleted the llvm branch February 2, 2021 03:44
@StephanTLavavej
Copy link
Member

Thanks again for taking care of this quarterly-ish update! 😻 🛠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants