Skip to content

Include STL/CRT libs and headers with LKG to eliminate yvals_core.h static_assert build errors on mismatch - #4933

Merged
Scott Jones (Scottj1s) merged 15 commits into
mainfrom
user/sjones/lkg_ucrt
Dec 6, 2024
Merged

Scott Jones (Scottj1s) merged 15 commits into
mainfrom
user/sjones/lkg_ucrt

Conversation

@Scottj1s

@Scottj1s Scott Jones (Scottj1s) commented Dec 3, 2024

Copy link
Copy Markdown
Member

When PR pipeline build agents take a Visual Studio update, the STL/CRT headers can become out of sync with the LKG toolset, causing this build error:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\yvals_core.h(902,1): Error C2338: static_assert failed: 'error STL1001: Unexpected compiler version, expected MSVC 19.41 or newer.'

This PR:

  • Ensures that the LKG and STL/CRT are a matched set (with workarounds, http://task.ms/55390787, http://task.ms/55390838)
  • Publishes binlogs for all operations, restore and build, success or fail (which should be our standard practice)
  • Renames BuildBinaries to BuildFoundation for clarity

Verified that all DLLs in transport package are still Hybrid CRT linked

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Scottj1s

Copy link
Copy Markdown
Member Author

/azp run

Comment thread LkgToolset.props
Comment on lines +7 to +8
<UseInternalMSUniCrtPackage>true</UseInternalMSUniCrtPackage>
<UndockedSettingsLoaded>true</UndockedSettingsLoaded>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the MsUCRT package requires explicit acknowledgement (opt in, on top of the yml task properties)

Comment on lines +24 to +26
includeUCRT: true
ucrtFeedPat: $(System.AccessToken)
platform: $(buildPlatform)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is the essential change - include the UCRT (STL/CRT libs/headers) along with the tools

Comment thread installer/dev/main.cpp

@alexlamtest alexlamtest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Scottj1s
Scott Jones (Scottj1s) merged commit 0d7a920 into main Dec 6, 2024
@Scottj1s
Scott Jones (Scottj1s) deleted the user/sjones/lkg_ucrt branch December 6, 2024 21:34
Godly T.Alias (godlytalias) pushed a commit that referenced this pull request Dec 13, 2024
…tatic_assert build errors on mismatch (#4933)

* include STL/CRT libs/headers with LKG

* add platform

* opt into internal UCRT

* opt into undocked settings loaded

* publish binlogs on failure

* use lower case platform for LKG toolset

* treat Platform as local to allow override of x86 to win32 for LKG

* define GUID_NULL, publish binlog on binary build failure

* define GUID_NULL another way

* collect binlogs for nuget restores

* fix restore binlog name

* nuget restore with platform for LKG compat, renamed BuildBinaries to BuildFoundation for clarity

* setting platform to win32 has downstream effects - surgically wrapping LKG imports instead

* import MsUCRT x86 targets explicitly

* removed unnecessary LKG targets overrides
@Scottj1s
Scott Jones (Scottj1s) restored the user/sjones/lkg_ucrt branch December 13, 2024 22:32
@Scottj1s
Scott Jones (Scottj1s) deleted the user/sjones/lkg_ucrt branch December 13, 2024 22:37
Scott Jones (Scottj1s) added a commit that referenced this pull request Dec 13, 2024
…tatic_assert build errors on mismatch (#4933)

* include STL/CRT libs/headers with LKG

* add platform

* opt into internal UCRT

* opt into undocked settings loaded

* publish binlogs on failure

* use lower case platform for LKG toolset

* treat Platform as local to allow override of x86 to win32 for LKG

* define GUID_NULL, publish binlog on binary build failure

* define GUID_NULL another way

* collect binlogs for nuget restores

* fix restore binlog name

* nuget restore with platform for LKG compat, renamed BuildBinaries to BuildFoundation for clarity

* setting platform to win32 has downstream effects - surgically wrapping LKG imports instead

* import MsUCRT x86 targets explicitly

* removed unnecessary LKG targets overrides
Scott Jones (Scottj1s) added a commit that referenced this pull request Dec 14, 2024
* Include STL/CRT libs and headers with LKG to eliminate yvals_core.h static_assert build errors on mismatch (#4933)

* include STL/CRT libs/headers with LKG

* add platform

* opt into internal UCRT

* opt into undocked settings loaded

* publish binlogs on failure

* use lower case platform for LKG toolset

* treat Platform as local to allow override of x86 to win32 for LKG

* define GUID_NULL, publish binlog on binary build failure

* define GUID_NULL another way

* collect binlogs for nuget restores

* fix restore binlog name

* nuget restore with platform for LKG compat, renamed BuildBinaries to BuildFoundation for clarity

* setting platform to win32 has downstream effects - surgically wrapping LKG imports instead

* import MsUCRT x86 targets explicitly

* removed unnecessary LKG targets overrides

* Find custom.props in parent dir (#4946)

* Update LkgToolset.props

Fix build break - custom.props in parent directory

* Update LkgToolset.props
Mike Crider (codendone) pushed a commit that referenced this pull request Jan 10, 2025
…tatic_assert build errors on mismatch (#4933)

* include STL/CRT libs/headers with LKG

* add platform

* opt into internal UCRT

* opt into undocked settings loaded

* publish binlogs on failure

* use lower case platform for LKG toolset

* treat Platform as local to allow override of x86 to win32 for LKG

* define GUID_NULL, publish binlog on binary build failure

* define GUID_NULL another way

* collect binlogs for nuget restores

* fix restore binlog name

* nuget restore with platform for LKG compat, renamed BuildBinaries to BuildFoundation for clarity

* setting platform to win32 has downstream effects - surgically wrapping LKG imports instead

* import MsUCRT x86 targets explicitly

* removed unnecessary LKG targets overrides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants