Skip to content

Commit c82e319

Browse files
authored
fix: Ensure exact string length is respected (#67)
1 parent 2065996 commit c82e319

File tree

13 files changed

+40
-10
lines changed

13 files changed

+40
-10
lines changed

build/Build.LibAlphaSkia.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ partial class Build
197197
PatchSkiaFile(SkiaPath / "BUILD.gn", buildNew, "Build", "#");
198198
PatchSkiaToolchain();
199199
PatchSkiaMacOsVersion();
200+
PatchLlvm();
200201
});
201202

202203

build/Build.LibSkia.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ partial class Build
263263
PatchSkiaToolchain();
264264
PatchSkiaMacOsVersion();
265265
PatchVulcanAllocatorIncludes();
266+
PatchLlvm();
266267
});
267268

268269
void PatchVulcanAllocatorIncludes()

build/Build.Native.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,32 @@ void PatchSkiaToolchain()
400400
" # env_setup = \"$shell set \\\"PATH=%PATH%;$win_vc\\\\Tools\\\\MSVC\\\\$win_toolchain_version\\\\bin\\\\HostX64\\\\x64\\\" && \""
401401
));
402402
}
403+
404+
void PatchLlvm()
405+
{
406+
// https://github.com/llvm/llvm-project/issues/95133
407+
// https://github.com/llvm/llvm-project/commit/bac4171073399352e5bd0ba541820e2a9b3f37d7
408+
if (!OperatingSystem.IsWindows())
409+
{
410+
return;
411+
}
412+
413+
AbsolutePath intrinHeaders = "C:\\Program Files\\LLVM\\lib\\clang";
414+
var headers = intrinHeaders.GlobFiles("**/intrin.h");
415+
foreach (var intrin in headers)
416+
{
417+
Log.Information("Rewriting clang header {header}", intrin);
418+
try
419+
{
420+
intrin.WriteAllText(intrin.ReadAllText()
421+
.Replace("unsigned __int32 xbegin(void);", "")
422+
.Replace("void _xend(void);", "")
423+
);
424+
}
425+
catch (Exception e)
426+
{
427+
Log.Error(e, "Error patching clang headers");
428+
}
429+
}
430+
}
403431
}

build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int LoadSkiaVersion()
3737
return int.Parse(text[(startOfMarker + marker.Length)..endOfMarker].Trim());
3838
}
3939

40-
static readonly Version FileVersionBase = new Version(3, 3, 0, 0);
40+
static readonly Version FileVersionBase = new Version(3, 4, 0, 0);
4141

4242
#endregion
4343

lib/dotnet/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<DebugType>portable</DebugType>
55
<DebugSymbols>true</DebugSymbols>
6-
<Version Condition=" '$(Version)' == '' ">3.3.135</Version>
6+
<Version Condition=" '$(Version)' == '' ">3.4.135</Version>
77
<AssemblyVersion Condition=" '$(AssemblyVersion)' == '' ">$(Version).0</AssemblyVersion>
88
<FileVersion Condition=" '$(FileVersion)' == '' ">$(AssemblyVersion)</FileVersion>
99
<NeutralLanguage>en</NeutralLanguage>

lib/java/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var libAuthorId = ""
2020
var libAuthorName = ""
2121
var libOrgUrl = ""
2222
var libCompany = ""
23-
var libVersion = "3.3.135"
23+
var libVersion = "3.4.135"
2424
var libProjectUrl = ""
2525
var libGitUrlHttp = ""
2626
var libGitUrlGit = ""

lib/node/alphaskia-linux/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coderline/alphaskia-linux",
3-
"version": "3.3.135",
3+
"version": "3.4.135",
44
"description": "The node addon for alphaSkia enabling it to run on Linux",
55
"engines": {
66
"node": ">=18.0.0"

lib/node/alphaskia-macos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coderline/alphaskia-macos",
3-
"version": "3.3.135",
3+
"version": "3.4.135",
44
"description": "The node addon for alphaSkia enabling it to run on MacOS",
55
"engines": {
66
"node": ">=18.0.0"

lib/node/alphaskia-windows/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coderline/alphaskia-windows",
3-
"version": "3.3.135",
3+
"version": "3.4.135",
44
"description": "The node addon for alphaSkia enabling it to run on Windows",
55
"engines": {
66
"node": ">=18.0.0"

lib/node/alphaskia/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coderline/alphaskia",
3-
"version": "3.3.135",
3+
"version": "3.4.135",
44
"description": "A Skia based rendering backend for alphaTab.",
55
"module": "./dist/alphaskia.mjs",
66
"typings": "./dist/alphaskia.d.ts",

0 commit comments

Comments
 (0)