-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build for Linux ARM32 (armhf) and ARM64 (aarch64) (#1382)
Co-authored-by: jp2masa <jp2masa@users.noreply.github.com>
- Loading branch information
1 parent
35a7522
commit a3472b0
Showing
27 changed files
with
462 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
DirectoryPath ROOT_PATH = MakeAbsolute(Directory("../..")); | ||
|
||
#load "../../cake/shared.cake" | ||
|
||
if (BUILD_ARCH.Length == 0) | ||
BUILD_ARCH = new [] { "arm" }; | ||
|
||
string GetGnArgs(string arch) | ||
{ | ||
var toolchainArch = arch == "arm" | ||
? "arm-linux-gnueabihf" | ||
: "aarch64-linux-gnu"; | ||
var targetArch = arch == "arm" | ||
? "armv7a-linux-gnueabihf" | ||
: "aarch64-linux-gnu"; | ||
|
||
var sysroot = $"/usr/{toolchainArch}"; | ||
var init = $"'--sysroot={sysroot}', '--target={targetArch}'"; | ||
var bin = $"'-B{sysroot}/bin/' "; | ||
var libs = $"'-L{sysroot}/lib/' "; | ||
var includes = | ||
$"'-I{sysroot}/include', " + | ||
$"'-I{sysroot}/include/c++/current', " + | ||
$"'-I{sysroot}/include/c++/current/{toolchainArch}' "; | ||
|
||
return | ||
$"extra_asmflags+=[ {init}, '-no-integrated-as', {bin}, {includes} ] " + | ||
$"extra_cflags+=[ {init}, {bin}, {includes} ] " + | ||
$"extra_ldflags+=[ {init}, {bin}, {libs} ] " + | ||
ADDITIONAL_GN_ARGS; | ||
} | ||
|
||
Task("libSkiaSharp") | ||
.WithCriteria(IsRunningOnLinux()) | ||
.Does(() => | ||
{ | ||
foreach (var arch in BUILD_ARCH) { | ||
RunCake("../linux/build.cake", "libSkiaSharp", new Dictionary<string, string> { | ||
{ "arch", arch }, | ||
{ "gnArgs", GetGnArgs(arch) }, | ||
}); | ||
} | ||
}); | ||
|
||
Task("libHarfBuzzSharp") | ||
.WithCriteria(IsRunningOnLinux()) | ||
.Does(() => | ||
{ | ||
foreach (var arch in BUILD_ARCH) { | ||
RunCake("../linux/build.cake", "libHarfBuzzSharp", new Dictionary<string, string> { | ||
{ "arch", arch }, | ||
{ "gnArgs", GetGnArgs(arch) }, | ||
}); | ||
} | ||
}); | ||
|
||
Task("Default") | ||
.IsDependentOn("libSkiaSharp") | ||
.IsDependentOn("libHarfBuzzSharp"); | ||
|
||
RunTarget(TARGET); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.