pg.ddx.io  GitHub: postgresql-interfaces/psqlodbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: davecramer (@davecramer) <noreply+davecramer@github.com>
To: postgresql-interfaces/psqlodbc <noreply+postgresql-interfaces-psqlodbc@github.com>
Subject: [postgresql-interfaces/psqlodbc] PR #242: Build mimalloc without assembler listings
Date: Wed, 18 Nov 2026 19:43:44 +0000
Message-ID: <gh-postgresql-interfaces-psqlodbc-242@github.com> (raw)

The mimalloc variant of the MSBuild workflow fails since the `windows-2025-vs2026` runner image moved to MSVC 14.52 (image `20261111.635`, MSVC 14.52.37025; the previous image `20261103.629` had 14.51.36231 and built fine):

```
stats.c(1,1): error C1083: Cannot open compiler generated file:
'...\libs\mimalloc\out\msvc-Win32\mimalloc\Release\stats.asm': Invalid argument
```

mimalloc's `ide/vs2022/mimalloc.vcxproj` compiles every file with `/FAs` (`AssemblerOutput=AssemblyAndSourceCode`), and MSVC 14.52 cannot write the listing of `stats.c`. This reproduces locally with Visual Studio 2026 18.12.1 for both Win32 and x64, outside CI.

The listings are not used, so `BuildAll.ps1 -UseMimalloc` now passes `ForceImportBeforeCppTargets` pointing at a new `winbuild/mimalloc.props`, which sets `AssemblerOutput` to `NoListing`. MSBuild imports it after the project's own settings, so the submodule is left unchanged.

Tested locally with MSVC 14.52.37025:
- `BuildAll.ps1 -Platform x64 -UseMimalloc` builds mimalloc without `/FAs` and links it into `psqlodbc35w.dll` and `psqlodbc30a.dll`.
- mimalloc for Win32 Release builds with the same property.

Both failed with the error above before this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


inline patch 1: winbuild/BuildAll.ps1, winbuild/mimalloc.props (+20/-2 lines) download inline-1.patchdiff --git a/winbuild/BuildAll.ps1 b/winbuild/BuildAll.ps1 index 729cc793..3573c3f6 100755 --- a/winbuild/BuildAll.ps1 +++ b/winbuild/BuildAll.ps1 @@ -122,8 +122,9 @@ function buildPlatform([xml]$configInfo, [string]$Platform) default { throw "Unable to resolve mimalloc IDE directory for VC ${VCVersion}."} } - # build mimalloc dependency - & ${msbuildexe} ..\libs\mimalloc\ide\$mimallocIdeDir\mimalloc.vcxproj /tv:$MSToolsV "/p:Platform=$Platform;Configuration=$Configuration;PlatformToolset=${Toolset}" /t:$target /p:VisualStudioVersion=${VCVersion} + # build mimalloc dependency, without the assembler listings that + # mimalloc.props turns off + & ${msbuildexe} ..\libs\mimalloc\ide\$mimallocIdeDir\mimalloc.vcxproj /tv:$MSToolsV "/p:Platform=$Platform;Configuration=$Configuration;PlatformToolset=${Toolset}" /t:$target /p:VisualStudioVersion=${VCVersion} "/p:ForceImportBeforeCppTargets=$scriptPath\mimalloc.props" } # build psqlodbc diff --git a/winbuild/mimalloc.props b/winbuild/mimalloc.props new file mode 100644 index 00000000..0502c7c3 --- /dev/null +++ b/winbuild/mimalloc.props @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Imported into the mimalloc build through ForceImportBeforeCppTargets, + after mimalloc's own project settings, by BuildAll.ps1 -UseMimalloc. + + mimalloc's project asks for an assembler listing of every source file + (/FAs). MSVC 14.52 fails to write the listing of stats.c ("C1083: + Cannot open compiler generated file: 'stats.asm': Invalid argument"), + and the driver does not use the listings, so turn them off. +--> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"; + <ItemDefinitionGroup> + <ClCompile> + <AssemblerOutput>NoListing</AssemblerOutput> + </ClCompile> + </ItemDefinitionGroup> +</Project>

Message-ID: <gh-postgresql-interfaces-psqlodbc-242@github.com>
Permalink:  ../gh-postgresql-interfaces-psqlodbc-242@github.com/

 ·  · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox