[PR #8150] Use LanguageStandard over explicit compiler flag for C++17 #27121

Open
opened 2026-01-31 09:20:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8150

State: closed
Merged: Yes


Turns out there's an actual way to specify C++17 for MSBuild purposes
besides just passing the compile flag.

References

  • Future C++20 support (modules)

PR Checklist

  • Closes random fact found while exploring VS16.8 preview C++20
    modules.
  • I work here.
  • It still builds.

Detailed Description of the Pull Request / Additional comments

  • We've been setting C++17 with just the flag passed to the compiler
    cl.exe. But it turns out that this particular LanguageStandard
    option will need to be set appropriately one day for us to use C++20
    modules (as evidenced by the latest VS16.8 preview that I tried out to
    explore modules.) The AdditionalOption alone isn't enough to ensure
    that modules can be "seen" by other projects after production, but
    LanguageStandard is (and will set the compiler option as appropriate
    as well as whatever internal goo that MSBuild needs to hook up other
    stuff.)

Validation Steps Performed

  • Built with it changed.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/8150 **State:** closed **Merged:** Yes --- Turns out there's an actual way to specify C++17 for MSBuild purposes besides just passing the compile flag. ## References * Future C++20 support (modules) ## PR Checklist * [x] Closes random fact found while exploring VS16.8 preview C++20 modules. * [x] I work here. * [x] It still builds. ## Detailed Description of the Pull Request / Additional comments * We've been setting C++17 with just the flag passed to the compiler `cl.exe`. But it turns out that this particular `LanguageStandard` option will need to be set appropriately one day for us to use C++20 modules (as evidenced by the latest VS16.8 preview that I tried out to explore modules.) The `AdditionalOption` alone isn't enough to ensure that modules can be "seen" by other projects after production, but `LanguageStandard` is (and will set the compiler option as appropriate as well as whatever internal goo that MSBuild needs to hook up other stuff.) ## Validation Steps Performed * Built with it changed.
claunia added the pull-request label 2026-01-31 09:20:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27121