aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
authorkevinjeon-g <136382173+kevinjeon-g@users.noreply.github.com>2024-02-03 15:21:53 -0500
committerGitHub <noreply@github.com>2024-02-03 22:21:53 +0200
commit71b2065c8c8e007a6ac6bbb847c222470012e997 (patch)
tree1290cbf41147db31f4408b662da0e9a25de6fb5b /lib/compilers
parent02f455aee517df3889730121a26b5d8d9b894baa (diff)
downloadcompiler-explorer-71b2065c8c8e007a6ac6bbb847c222470012e997.tar.gz
compiler-explorer-71b2065c8c8e007a6ac6bbb847c222470012e997.zip
Override getVersion() for dex2oat (#6076)gh-10415
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE IT Thanks for taking the time to improve CE. We really appreciate it. Before opening the PR, please make sure that the tests & linter pass their checks, by running `make check`. In the best case scenario, you are also adding tests to back up your changes, but don't sweat it if you don't. We can discuss them at a later date. Feel free to append your name to the CONTRIBUTORS.md file Thanks again, we really appreciate this! -->
Diffstat (limited to 'lib/compilers')
-rw-r--r--lib/compilers/dex2oat.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/compilers/dex2oat.ts b/lib/compilers/dex2oat.ts
index 240964165..874c04687 100644
--- a/lib/compilers/dex2oat.ts
+++ b/lib/compilers/dex2oat.ts
@@ -264,6 +264,17 @@ export class Dex2OatCompiler extends BaseCompiler {
return [];
}
+ // dex2oat doesn't have --version, but artArtifactDir contains a file with
+ // the build number.
+ override async getVersion() {
+ const versionFile = this.artArtifactDir + '/snapshot-creation-build-number.txt';
+ const version = fs.readFileSync(versionFile, {encoding: 'utf-8'});
+ return {
+ stdout: [version],
+ stderr: [],
+ };
+ }
+
override async processAsm(result) {
let asm: string = '';