Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Switch to a TrueType font (`TT`) and bump the size (`16pt`) for a clean, modern

| Platform | Default | Runtime | Notes |
| --- | --- | --- | --- |
| Windows x86-64 | `native` | hosted libc (`--libc`) | Links QuickJS, WinHTTP, Winsock, gzip bridge, and miniz. Release builds pass the Windows GUI subsystem flags. |
| Windows x86-64 | `native` | hosted libc (`--libc`) | Links QuickJS, WinHTTP, Winsock, gzip bridge, and miniz. Release builds pass the Windows GUI subsystem flag. |
| Linux x86-64 | `native` | hosted libc (`--libc`) | Adds `-D_GNU_SOURCE` for bundled QuickJS and `-static` so release/test binaries do not depend on a host musl loader, avoids the known QuickJS/freestanding crash path, and links gzip bridge + miniz through the native backend. |
| macOS x86-64 | `c` | C backend | Native backend is not supported on macOS, so macOS intentionally stays on the C backend. |

Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $windowsNative = @(Add-OscaWebPlatformLinkArgs -InputArgs @('input.osc') -Config
Assert-ContainsSequence -Name 'Windows uses extra-lib for WinHTTP when supported' -ActualArgs $windowsNative -Sequence @('--extra-lib', 'winhttp')
Assert-ContainsSequence -Name 'Windows uses extra-lib for Winsock when supported' -ActualArgs $windowsNative -Sequence @('--extra-lib', 'ws2_32')
Assert-ContainsSequence -Name 'Windows GUI keeps subsystem driver flag' -ActualArgs $windowsNative -Sequence @('--extra-cflags', '-Wl,--subsystem,windows')
Assert-ContainsSequence -Name 'Windows GUI keeps mainCRTStartup driver flag' -ActualArgs $windowsNative -Sequence @('--extra-cflags', '-Wl,--entry,mainCRTStartup')
Assert-NotContainsSequence -Name 'Windows GUI does not override CRT entrypoint' -ActualArgs $windowsNative -Sequence @('--extra-cflags', '-Wl,--entry,mainCRTStartup')

$windowsLegacy = @(Add-OscaWebPlatformLinkArgs -InputArgs @('input.osc') -Config (New-TestConfig -Backend native -SupportsExtraLib $false) -Platform windows)
Assert-ContainsSequence -Name 'Windows falls back to extra-cflags library syntax for old oscan' -ActualArgs $windowsLegacy -Sequence @('--extra-cflags', '-lwinhttp')
Expand Down
1 change: 0 additions & 1 deletion tools/build_common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ function Add-OscaWebPlatformLinkArgs {
$out = Add-OscaWebExtraLibArg -InputArgs $out -Config $Config -Library 'ws2_32'
if ($WindowsGui) {
$out = Add-OscaWebExtraCFlagArg -InputArgs $out -Flag '-Wl,--subsystem,windows'
$out = Add-OscaWebExtraCFlagArg -InputArgs $out -Flag '-Wl,--entry,mainCRTStartup'
}
} elseif ($Platform -eq 'linux' -and $Config.Backend -eq 'native') {
$out = Add-OscaWebExtraCFlagArg -InputArgs $out -Flag '-D_GNU_SOURCE'
Expand Down