Add target-compiler-triple option (#88)

This commit is contained in:
Hidenori Matsubayashi
2022-04-07 16:35:28 +09:00
committed by GitHub
parent fc4efe0ac2
commit 7fd1502d58
4 changed files with 18 additions and 6 deletions
+9 -1
View File
@@ -38,7 +38,7 @@ class BuildPackageCommand extends BuildSubCommand
'target-arch',
defaultsTo: _getCurrentHostPlatformArchName(),
allowed: <String>['x64', 'arm64'],
help: 'Target architecture for which the the app is compiled',
help: 'Target architecture for which the app is compiled',
);
argParser.addOption(
'target-backend-type',
@@ -46,6 +46,13 @@ class BuildPackageCommand extends BuildSubCommand
allowed: <String>['wayland', 'gbm', 'eglstream', 'x11'],
help: 'Target backend type that the app will run on devices.',
);
argParser.addOption(
'target-compiler-triple',
defaultsTo: 'aarch64-linux-gnu',
help: 'Target compiler triple for which the app is compiled. '
'This option is used only if the target architectures is '
'arm64 (for cross-building for x64 on arm64).',
);
argParser.addOption(
'target-sysroot',
defaultsTo: '/',
@@ -105,6 +112,7 @@ class BuildPackageCommand extends BuildSubCommand
final ELinuxBuildInfo eLinuxBuildInfo = ELinuxBuildInfo(buildInfo,
targetArch: targetArch,
targetBackendType: stringArg('target-backend-type'),
targetCompilerTriple: stringArg('target-compiler-triple'),
targetSysroot: stringArg('target-sysroot'),
systemIncludeDirectories: stringArg('system-include-directories'));
validateBuild(eLinuxBuildInfo);