-
Notifications
You must be signed in to change notification settings - Fork 184
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
Allow cross-compiling AOT snapshots in benchmark builder #701
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
/// Maps `--aot-target` arguments to their [AotTarget]s | ||
const aotTargets = <String, AotTarget>{ |
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.
(to avoid duplication you could use AotTarget.values
and their string representation)
}); | ||
}); | ||
} | ||
|
||
const aotTarget = Target('aot', aotProcessArgs); |
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.
Is this aotTarget
and aotProcessArgs
unused now?
return Target('aot', (sourceFile) { | ||
final baseName = path.basename(sourceFile); | ||
final baseNameNoExt = path.withoutExtension(baseName); | ||
// TODO: Do we need `-Ddart.vm.product=true`? |
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.
Yes :)
In #698 we forgot to add cross-compilation support to benchmark builder, which
broke Golem.
This PR implements cross compilation support for AOT snapshots.
Changes:
AOT target is no longer enabled by default
When using
--target=aot
, we now expect one extra parameter and one env variable:--aot-target=[x64|armv7hf|armv8]
target platform of the snapshot$DART_SDK
env variable specifies the SDK path. We use this path to invokeprecompiler2
.We could avoid adding
--aot-target
with a syntax like--target=aot=x64
. Idon't know how common this syntax is.
Path to Dart SDK is an env variable as in my experience you usually set it in
your shell rc and we have other dev tools that expect
DART_SDK
to be set.@mkustermann @sigurdm any thoughts?