Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Sep 30, 2022

Use Visual Studio 2019 to build the engine.

This is a requirement to roll ANGLE as it is affected by an STL bug if built using Visual Studio 2017: angleproject#7693

Depends on: flutter/buildroot#632

Part of: flutter/flutter#110948

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.


if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))):
dia_path = os.path.join(win_sdk_dir, '..', 'DIA SDK', 'bin', 'amd64')
dia_path = os.path.join(win_sdk_dir, '..', '..', 'DIA SDK', 'bin', 'amd64')
Copy link
Member Author

@loic-sharma loic-sharma Sep 30, 2022

Choose a reason for hiding this comment

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

The depot tools moved the Windows 10 SDK one level deeper. Previous depot tools .zip layout:

\- DIA SDK
\- Windows Kits
 \- ... # This is the location of `DEPOT_TOOLS_WIN_TOOLCHAIN`

New depot tools .zip layout:

\- DIA SDK
\- Windows Kits
  \- 10 # New folder
    \- ... # This is the location of `DEPOT_TOOLS_WIN_TOOLCHAIN`

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it might not be a bad idea to document the path in a comment right above this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh whoops, I merged before seeing this comment. I'll add a comment in a follow-up PR for the ANGLE roll


// A FlutterDesktopWindowProcCallback that forwards to a std::function provided
// as user_data.
FLUTTER_NOINLINE
Copy link
Member Author

Choose a reason for hiding this comment

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

VS 2019 inlines TestWindowProcCallback and TestWindowProcCallback2 together, causing WindowProcDelegateManagerTest.RegisterMultiple to fail as the delegates' function pointers were the same:

TEST(WindowProcDelegateManagerTest, RegisterMultiple) {
WindowProcDelegateManager manager;
bool called_a = false;
TestWindowProcDelegate delegate_a =
[&called_a](HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
called_a = true;
return std::optional<LRESULT>();
};
bool called_b = false;
TestWindowProcDelegate delegate_b =
[&called_b](HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
called_b = true;
return std::optional<LRESULT>();
};
manager.RegisterTopLevelWindowProcDelegate(TestWindowProcCallback,
&delegate_a);
// Function pointer is different, so both should be called.
manager.RegisterTopLevelWindowProcDelegate(TestWindowProcCallback2,
&delegate_b);
manager.OnTopLevelWindowProc(nullptr, 0, 0, 0);
EXPECT_TRUE(called_a);
EXPECT_TRUE(called_b);
}

Copy link
Member

Choose a reason for hiding this comment

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

Compilers these days are getting too smart for their own good! 🤣

Copy link
Contributor

@yaakovschectman yaakovschectman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 4, 2022
@auto-submit auto-submit bot merged commit cbb96d0 into flutter:main Oct 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 4, 2022
loic-sharma added a commit that referenced this pull request Oct 4, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants