-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] Initial emscripten 3.1.30 support #81215
Changes from all commits
ed80ed3
96d59b8
6512388
0d522ba
f5a205e
7d2e8eb
44ede5e
ab5c12e
2e74270
e275857
54dfd24
c302891
9f145a3
d6f6a4e
5067a1d
0bb6b01
04a83eb
eb544bd
8b4a6e2
6e8bd62
48464d3
df724b5
2d67a1f
e6ecd14
918a47a
cde2398
b7999eb
1107185
4f5b216
0b3ce3c
053f2d3
a5a8498
a977682
d8b1e10
1e02d7c
e8f080b
031511d
889d036
f67ea5e
37f4314
c179e40
d2ee742
84dbae9
b94be3d
b551626
4c45801
c5f073f
b2a99a8
fda96f7
55fddbf
0da18d5
eb7be72
3fcf10f
6420bf6
58b5c1d
2a446e1
ef6443c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
# This seems to update the machine cert store so that python can download the files as required by emscripten's install | ||
# Based on info at https://pypi.org/project/certifi/ | ||
pip install certifi | ||
python -m pip install --upgrade pip | ||
pip install --upgrade certifi pip-system-certs | ||
|
||
$WebsiteURL="storage.googleapis.com" | ||
Try { | ||
$Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) | ||
function UpdateSite { | ||
|
||
param ( | ||
$WebsiteURL | ||
) | ||
|
||
Try { | ||
$Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) | ||
$Stream.AuthenticateAsClient($WebsiteURL) | ||
$Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) | ||
|
||
$Cert = $Stream.Get_RemoteCertificate() | ||
Try { | ||
$Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) | ||
$Stream.AuthenticateAsClient($WebsiteURL) | ||
|
||
$ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) | ||
$Cert = $Stream.Get_RemoteCertificate() | ||
|
||
Write-Host "`nConnection Successful" -ForegroundColor DarkGreen | ||
Write-Host "Website: $WebsiteURL" | ||
} | ||
Catch { Throw $_ } | ||
Finally { $Conn.close() } | ||
} | ||
Catch { | ||
Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow | ||
$ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) | ||
|
||
Write-Host "`nConnection Successful" -ForegroundColor DarkGreen | ||
Write-Host "Website: $WebsiteURL" | ||
Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow | ||
Write-Host "" | ||
} | ||
Catch { Throw $_ } | ||
Finally { $Conn.close() } | ||
} | ||
Catch { | ||
Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow | ||
Write-Host "Website: $WebsiteURL" | ||
Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow | ||
Write-Host "" | ||
} | ||
} | ||
|
||
UpdateSite("storage.googleapis.com") | ||
UpdateSite("www.sqlite.org") |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -187,6 +187,7 @@ | |||||
<_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp</_EmccLinkRsp> | ||||||
|
||||||
<EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == ''">$(EmccTotalMemory)</EmccInitialHeapSize> | ||||||
<EmccStackSize Condition="'$(EmccStackSize)' == ''">5MB</EmccStackSize> | ||||||
<WasmAllowUndefinedSymbols Condition="'$(WasmAllowUndefinedSymbols)' == ''">false</WasmAllowUndefinedSymbols> | ||||||
</PropertyGroup> | ||||||
|
||||||
|
@@ -322,10 +323,12 @@ | |||||
<WriteLinesToFile Lines="@(_EmccCFlags)" File="$(_EmccCompileRsp)" Overwrite="true" WriteOnlyWhenDifferent="true" /> | ||||||
<ItemGroup> | ||||||
<FileWrites Include="$(_EmccCompileRsp)" /> | ||||||
<EmscriptenMinimalBuildEnvVars Include="@(EmscriptenEnvVars)" /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be clearer to rename this to a private name like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can do it in the follow up PR, to avoid more icu/emsdk package switch backs. |
||||||
<EmscriptenMinimalBuildEnvVars Include="FROZEN_CACHE=" /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Microsoft.NET.Runtime.Emscripten.Cache SDK overrides the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See dotnet/emsdk#211 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we do that on purpose IIRC runtime/src/mono/wasm/build/WasmApp.Native.targets Lines 332 to 333 in 9f145a3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the freezing/build was required before we were shipping the cache package we should probably review the logic there There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to provide more context: the reason for the change itself is that the default value of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole does need to be reviewed again. If the workload is installed in non-user-writable location then how does the build behave? How does the |
||||||
</ItemGroup> | ||||||
|
||||||
<!-- warm up the cache --> | ||||||
<Exec Command="$(_EmBuilder) build MINIMAL" EnvironmentVariables="@(EmscriptenEnvVars)" StandardOutputImportance="Low" StandardErrorImportance="Low" /> | ||||||
<Exec Command="$(_EmBuilder) build MINIMAL" EnvironmentVariables="@(EmscriptenMinimalBuildEnvVars)" StandardOutputImportance="Low" StandardErrorImportance="Low" /> | ||||||
|
||||||
<Message Text="Compiling native assets with emcc with $(EmccCompileOptimizationFlag). This may take a while ..." Importance="High" /> | ||||||
<ItemGroup> | ||||||
|
@@ -419,6 +422,8 @@ | |||||
<ItemGroup> | ||||||
<!-- order matters --> | ||||||
<_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> | ||||||
<_EmccLDSFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> | ||||||
<_EmccLDSFlags Include="-s WASM_BIGINT=1" /> | ||||||
|
||||||
<_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> | ||||||
<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" /> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.12 | ||
3.1.30 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,8 @@ declare interface EmscriptenModule { | |
HEAPF64: Float64Array; | ||
_malloc(size: number): VoidPtr; | ||
_free(ptr: VoidPtr): void; | ||
print(message: string): void; | ||
printErr(message: string): void; | ||
out(message: string): void; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is API breaking change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we consider this API stable? We can still get the deprecated ones with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No
Yes please, I think these 2 are widely enough used even by Uno. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They could be removed from .d.ts but should keep working. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we want to be in the business of maintaining unstable emscripten apis that emscripten has dropped long term but we should document the change and short term compat is fine. |
||
err(message: string): void; | ||
ccall<T>(ident: string, returnType?: string | null, argTypes?: string[], args?: any[], opts?: any): T; | ||
cwrap<T extends Function>(ident: string, returnType: string, argTypes?: string[], opts?: any): T; | ||
cwrap<T extends Function>(ident: string, ...args: any[]): T; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it shouldn't we enable SIMD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not needed here, shouldn't harm though. I can do it in the follow up PR, to avoid more icu/emsdk package switch backs.