Repository navigation
[main] Source code updates from dotnet/runtime - #6423
Conversation
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance. |
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance. |
|
@max-charlamb I think this is failing due dotnet/runtime#126972 |
|
🤖 From Copilot: Culprit: PR dotnet/runtime#126972 — "[NativeAOT] Add cDAC data descriptor infrastructure" (commit e883467e, merged That PR is the only commit in the 013ca46…5761661 range that adds new C/C++ sources named exactly
Why it breaks the VMR Windows verticals The macro builds the new .c/.cpp files as a CMake OBJECT library with default MSVC flags. Under MSVC that means /Zi It only shows up on Windows_x64 and Windows_x86 (Linux/Mac/WASM/iOS/Android verticals all pass) because LNK4099 is Suggested fix (in dotnet/runtime, will then re-flow) In src/coreclr/clrdatadescriptors.cmake, for the MSVC branch, either:
/Z7 is the simplest and matches what other CoreCLR static-lib subdirs do for files that get re-archived into |
) > [!NOTE] > This PR was authored with assistance from GitHub Copilot. ## Problem The OBJECT libraries created by `generate_data_descriptors()` in `src/coreclr/clrdatadescriptors.cmake` compile `contract-descriptor.c` and `contractpointerdata.cpp` with MSVC defaults, which routes debug info into the compiler-default `vc140.pdb`. That PDB does not travel with the `.obj` files when they are archived into a static library such as `Runtime.ServerGC.lib`. Downstream linkers — in particular the NativeAOT publish of `ILCompiler`, `crossgen2`, and `ilasm` on Windows — then emit `LNK4099` ("PDB 'vc140.pdb' was not found") for each affected object, which is fatal under `/WX`. ## Symptom The `dotnet/runtime` → `dotnet/dotnet` codeflow PR [dotnet/dotnet#6423](dotnet/dotnet#6423) is blocked: the **VMR Vertical Build Windows_x64** and **VMR Vertical Build Windows_x86** legs both fail with 22 `LNK4099` errors apiece, e.g.: ``` Runtime.ServerGC.lib(contract-descriptor.c.obj) : error LNK4099: PDB 'vc140.pdb' was not found with 'Runtime.ServerGC.lib(contract-descriptor.c.obj)' or at '...\artifacts\bin\ILCompiler_publish\x64\Release\native\vc140.pdb'; linking object as if no debug info [src\coreclr\tools\aot\ILCompiler\ILCompiler_publish.csproj] Runtime.ServerGC.lib(contractpointerdata.cpp.obj) : error LNK4099: ... ``` repeated for `crossgen2_publish.csproj` and `ilasm.csproj`. Linux/macOS/WASM/iOS/Android verticals all pass — `LNK4099` is MSVC-specific. The regression was introduced by #126972 ("[NativeAOT] Add cDAC data descriptor infrastructure"), which wired the new descriptor `OBJECT` libraries into the NativeAOT runtime so they end up archived inside `Runtime.ServerGC.lib`. ## Fix Set `COMPILE_PDB_NAME` and `COMPILE_PDB_OUTPUT_DIRECTORY` on `${LIBRARY}` so each descriptor library produces its own deterministic PDB that the consuming linker can locate. This matches the convention already used by `install_static_library` in `eng/native/functions.cmake`. ## Validation - CMake reconfigures cleanly. - Ninja built `nativeaot_gc_svr_descriptor`, `nativeaot_gc_wks_descriptor`, `nativeaot_cdac_contract_descriptor`, and `cdac_contract_descriptor` without errors on linux-x64. - The actual `LNK4099` resolution can only be verified on a Windows NativeAOT publish leg in CI; please pay particular attention to the Windows legs and to the next forward-flow into `dotnet/dotnet`. cc @max-charlamb (author of #126972) --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Steve Pfister <[email protected]>
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/prodconsvcs for assistance. |
The per-target compile PDB introduced by dotnet/runtime#127836 only renamed the missing PDB - the external PDB still stays in the producer's binary dir and is not visible to downstream linkers consuming Runtime.ServerGC.lib / Runtime.WorkstationGC.lib. The result was that the LNK4099 errors changed shape (from missing 'vc140.pdb' to missing per-target named PDBs) but remained fatal under /WX in the VMR Windows verticals. Adding /Z7 makes each .obj carry its CodeView debug info inline, so the data travels with the object file when it is archived into a static lib and reaches the consumer's linker without needing a separate .pdb file. This unblocks the VMR Vertical Build Windows_x64 / Windows_x86 legs in PR 6423 and similar codeflow PRs. Co-authored-by: Copilot <[email protected]>
) > [!NOTE] > This PR was authored with assistance from GitHub Copilot. ## Problem The OBJECT libraries created by `generate_data_descriptors()` in `src/coreclr/clrdatadescriptors.cmake` compile `contract-descriptor.c` and `contractpointerdata.cpp` with MSVC defaults, which routes debug info into the compiler-default `vc140.pdb`. That PDB does not travel with the `.obj` files when they are archived into a static library such as `Runtime.ServerGC.lib`. Downstream linkers — in particular the NativeAOT publish of `ILCompiler`, `crossgen2`, and `ilasm` on Windows — then emit `LNK4099` ("PDB 'vc140.pdb' was not found") for each affected object, which is fatal under `/WX`. ## Symptom The `dotnet/runtime` → `dotnet/dotnet` codeflow PR [dotnet/dotnet#6423](dotnet/dotnet#6423) is blocked: the **VMR Vertical Build Windows_x64** and **VMR Vertical Build Windows_x86** legs both fail with 22 `LNK4099` errors apiece, e.g.: ``` Runtime.ServerGC.lib(contract-descriptor.c.obj) : error LNK4099: PDB 'vc140.pdb' was not found with 'Runtime.ServerGC.lib(contract-descriptor.c.obj)' or at '...\artifacts\bin\ILCompiler_publish\x64\Release\native\vc140.pdb'; linking object as if no debug info [src\coreclr\tools\aot\ILCompiler\ILCompiler_publish.csproj] Runtime.ServerGC.lib(contractpointerdata.cpp.obj) : error LNK4099: ... ``` repeated for `crossgen2_publish.csproj` and `ilasm.csproj`. Linux/macOS/WASM/iOS/Android verticals all pass — `LNK4099` is MSVC-specific. The regression was introduced by #126972 ("[NativeAOT] Add cDAC data descriptor infrastructure"), which wired the new descriptor `OBJECT` libraries into the NativeAOT runtime so they end up archived inside `Runtime.ServerGC.lib`. ## Fix Set `COMPILE_PDB_NAME` and `COMPILE_PDB_OUTPUT_DIRECTORY` on `${LIBRARY}` so each descriptor library produces its own deterministic PDB that the consuming linker can locate. This matches the convention already used by `install_static_library` in `eng/native/functions.cmake`. ## Validation - CMake reconfigures cleanly. - Ninja built `nativeaot_gc_svr_descriptor`, `nativeaot_gc_wks_descriptor`, `nativeaot_cdac_contract_descriptor`, and `cdac_contract_descriptor` without errors on linux-x64. - The actual `LNK4099` resolution can only be verified on a Windows NativeAOT publish leg in CI; please pay particular attention to the Windows legs and to the next forward-flow into `dotnet/dotnet`. cc @max-charlamb (author of #126972) --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Steve Pfister <[email protected]>
Note
This is a codeflow update. It may contain both source code changes from
the source repo
as well as dependency updates. Learn more here.
This pull request brings the following source code changes
From https://github.com/dotnet/runtime
Diff the source with this PR branch